]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
udf: move headers out include/linux/
authorChristoph Hellwig <hch@lst.de>
Fri, 22 Feb 2008 11:39:12 +0000 (12:39 +0100)
committerJan Kara <jack@suse.cz>
Thu, 17 Apr 2008 12:22:23 +0000 (14:22 +0200)
There's really no reason to keep udf headers in include/linux as they're
not used by anything but fs/udf/.

This patch merges most of include/linux/udf_fs_i.h into fs/udf/udf_i.h,
include/linux/udf_fs_sb.h into fs/udf/udf_sb.h and
include/linux/udf_fs.h into fs/udf/udfdecl.h.

The only thing remaining in include/linux/ is a stub of udf_fs_i.h
defining the four user-visible udf ioctls.  It's also moved from
unifdef-y to headers-y because it can be included unconditionally now.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
16 files changed:
fs/udf/file.c
fs/udf/ialloc.c
fs/udf/lowlevel.c
fs/udf/misc.c
fs/udf/partition.c
fs/udf/super.c
fs/udf/symlink.c
fs/udf/truncate.c
fs/udf/udf_i.h
fs/udf/udf_sb.h
fs/udf/udfdecl.h
fs/udf/unicode.c
include/linux/Kbuild
include/linux/udf_fs.h [deleted file]
include/linux/udf_fs_i.h
include/linux/udf_fs_sb.h [deleted file]

index 822cc407152791db90402c266eaee911b71013a6..0ed6e146a0d9968939a45b09fec96a2bf42e9e5e 100644 (file)
@@ -27,7 +27,6 @@
 
 #include "udfdecl.h"
 #include <linux/fs.h>
-#include <linux/udf_fs.h>
 #include <asm/uaccess.h>
 #include <linux/kernel.h>
 #include <linux/string.h> /* memset */
index 84360315aca2083001727f1defc0d453b4c07779..c3fb28eee6465f61624c17bc9ff7617806208caf 100644 (file)
@@ -21,7 +21,6 @@
 #include "udfdecl.h"
 #include <linux/fs.h>
 #include <linux/quotaops.h>
-#include <linux/udf_fs.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 
index 579bae71e67efe7dc62d69d3998b184da2f14f93..703843f30ffd383f556639af7146c0d99a212c25 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/cdrom.h>
 #include <asm/uaccess.h>
 
-#include <linux/udf_fs.h>
 #include "udf_sb.h"
 
 unsigned int udf_get_last_session(struct super_block *sb)
index a1d6da0caf7132121e7b5d69ea880aeeb97d1875..581b6e4cc591906d06e94a0a618663cea6b428a7 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <linux/fs.h>
 #include <linux/string.h>
-#include <linux/udf_fs.h>
 #include <linux/buffer_head.h>
 
 #include "udf_i.h"
index fc533345ab89198a12fb472765f7c9073a356970..307c9c33d184938b3d9a4b81a8d60b489a8ed3b6 100644 (file)
@@ -24,7 +24,6 @@
 
 #include <linux/fs.h>
 #include <linux/string.h>
-#include <linux/udf_fs.h>
 #include <linux/slab.h>
 #include <linux/buffer_head.h>
 
index 53e1d6e6dd313bb8b7226e52f7530f144781f4bf..02815e92553b3947466ec57b15146c9a2952a711 100644 (file)
@@ -57,7 +57,6 @@
 #include <linux/seq_file.h>
 #include <asm/byteorder.h>
 
-#include <linux/udf_fs.h>
 #include "udf_sb.h"
 #include "udf_i.h"
 
index 6ec99221e50c6c02dd90df64e8b0a39d9bc771b8..c3265e1385d43c5c6ed0e2960cf9d83a72493e4a 100644 (file)
@@ -23,7 +23,6 @@
 #include <asm/uaccess.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
-#include <linux/udf_fs.h>
 #include <linux/time.h>
 #include <linux/mm.h>
 #include <linux/stat.h>
index fe61be17cdab93315f5f66b32d5add96b20b1d23..6111d97902d756c9cf5fb5ca0bd3f4895a7e6ed7 100644 (file)
@@ -22,7 +22,6 @@
 #include "udfdecl.h"
 #include <linux/fs.h>
 #include <linux/mm.h>
-#include <linux/udf_fs.h>
 #include <linux/buffer_head.h>
 
 #include "udf_i.h"
index ccc52f16bf7d573291a94aedab5ef6d33cfc8bee..d6d9a774a1c1b2f13d371912be7cceaa53c22928 100644 (file)
@@ -1,10 +1,32 @@
-#ifndef __LINUX_UDF_I_H
-#define __LINUX_UDF_I_H
+#ifndef _UDF_I_H
+#define _UDF_I_H
+
+struct udf_inode_info {
+       struct timespec         i_crtime;
+       /* Physical address of inode */
+       kernel_lb_addr          i_location;
+       __u64                   i_unique;
+       __u32                   i_lenEAttr;
+       __u32                   i_lenAlloc;
+       __u64                   i_lenExtents;
+       __u32                   i_next_alloc_block;
+       __u32                   i_next_alloc_goal;
+       unsigned                i_alloc_type : 3;
+       unsigned                i_efe : 1;
+       unsigned                i_use : 1;
+       unsigned                i_strat4096 : 1;
+       unsigned                reserved : 26;
+       union {
+               short_ad        *i_sad;
+               long_ad         *i_lad;
+               __u8            *i_data;
+       } i_ext;
+       struct inode vfs_inode;
+};
 
-#include <linux/udf_fs_i.h>
 static inline struct udf_inode_info *UDF_I(struct inode *inode)
 {
        return list_entry(inode, struct udf_inode_info, vfs_inode);
 }
 
-#endif /* !defined(_LINUX_UDF_I_H) */
+#endif /* _UDF_I_H) */
index 737d1c604eea0330848b1223dc4e696f4fee0cb7..fb2a6e9f8dacb741f2d49fc6cb5a30c47419e01d 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __LINUX_UDF_SB_H
 #define __LINUX_UDF_SB_H
 
+#include <linux/mutex.h>
+
 /* Since UDF 2.01 is ISO 13346 based... */
 #define UDF_SUPER_MAGIC                        0x15013346
 
 #define UDF_PART_FLAG_REWRITABLE       0x0040
 #define UDF_PART_FLAG_OVERWRITABLE     0x0080
 
+#define UDF_MAX_BLOCK_LOADED   8
+
+#define UDF_TYPE1_MAP15                        0x1511U
+#define UDF_VIRTUAL_MAP15              0x1512U
+#define UDF_VIRTUAL_MAP20              0x2012U
+#define UDF_SPARABLE_MAP15             0x1522U
+
+#pragma pack(1) /* XXX(hch): Why?  This file just defines in-core structures */
+
+struct udf_sparing_data {
+       __u16   s_packet_len;
+       struct buffer_head *s_spar_map[4];
+};
+
+struct udf_virtual_data {
+       __u32   s_num_entries;
+       __u16   s_start_offset;
+};
+
+struct udf_bitmap {
+       __u32                   s_extLength;
+       __u32                   s_extPosition;
+       __u16                   s_nr_groups;
+       struct buffer_head      **s_block_bitmap;
+};
+
+struct udf_part_map {
+       union {
+               struct udf_bitmap       *s_bitmap;
+               struct inode            *s_table;
+       } s_uspace;
+       union {
+               struct udf_bitmap       *s_bitmap;
+               struct inode            *s_table;
+       } s_fspace;
+       __u32   s_partition_root;
+       __u32   s_partition_len;
+       __u16   s_partition_type;
+       __u16   s_partition_num;
+       union {
+               struct udf_sparing_data s_sparing;
+               struct udf_virtual_data s_virtual;
+       } s_type_specific;
+       __u32   (*s_partition_func)(struct super_block *, __u32, __u16, __u32);
+       __u16   s_volumeseqnum;
+       __u16   s_partition_flags;
+};
+
+#pragma pack()
+
+struct udf_sb_info {
+       struct udf_part_map     *s_partmaps;
+       __u8                    s_volume_ident[32];
+
+       /* Overall info */
+       __u16                   s_partitions;
+       __u16                   s_partition;
+
+       /* Sector headers */
+       __s32                   s_session;
+       __u32                   s_anchor[4];
+       __u32                   s_last_block;
+
+       struct buffer_head      *s_lvid_bh;
+
+       /* Default permissions */
+       mode_t                  s_umask;
+       gid_t                   s_gid;
+       uid_t                   s_uid;
+
+       /* Root Info */
+       struct timespec         s_record_time;
+
+       /* Fileset Info */
+       __u16                   s_serial_number;
+
+       /* highest UDF revision we have recorded to this media */
+       __u16                   s_udfrev;
+
+       /* Miscellaneous flags */
+       __u32                   s_flags;
+
+       /* Encoding info */
+       struct nls_table        *s_nls_map;
+
+       /* VAT inode */
+       struct inode            *s_vat_inode;
+
+       struct mutex            s_alloc_mutex;
+};
+
 static inline struct udf_sb_info *UDF_SB(struct super_block *sb)
 {
        return sb->s_fs_info;
index 681dc2b66cdbb9583e7c8f2d958f227f96928380..c9c75856af803cb898491a1799b0cb5a9ef07f52 100644 (file)
@@ -1,18 +1,37 @@
 #ifndef __UDF_DECL_H
 #define __UDF_DECL_H
 
-#include <linux/udf_fs.h>
 #include "ecma_167.h"
 #include "osta_udf.h"
 
 #include <linux/fs.h>
 #include <linux/types.h>
-#include <linux/udf_fs_i.h>
-#include <linux/udf_fs_sb.h>
 #include <linux/buffer_head.h>
+#include <linux/udf_fs_i.h>
 
+#include "udf_sb.h"
 #include "udfend.h"
 
+#define UDF_PREALLOCATE
+#define UDF_DEFAULT_PREALLOC_BLOCKS    8
+
+#undef UDFFS_DEBUG
+
+#ifdef UDFFS_DEBUG
+#define udf_debug(f, a...) \
+do { \
+       printk(KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \
+               __FILE__, __LINE__, __func__); \
+       printk(f, ##a); \
+} while (0)
+#else
+#define udf_debug(f, a...) /**/
+#endif
+
+#define udf_info(f, a...) \
+       printk(KERN_INFO "UDF-fs INFO " f, ##a);
+
+
 #define udf_fixed_to_variable(x) ( ( ( (x) >> 5 ) * 39 ) + ( (x) & 0x0000001F ) )
 #define udf_variable_to_fixed(x) ( ( ( (x) / 39 ) << 5 ) + ( (x) % 39 ) )
 
index e533b11703bf60a1e8e5d2a0d94b909585940a1d..b9de050ad8302725c3d9a58b46ed494f759199f2 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/kernel.h>
 #include <linux/string.h>      /* for memset */
 #include <linux/nls.h>
-#include <linux/udf_fs.h>
 
 #include "udf_sb.h"
 
index aada32fffec2b18fa0ae39516ea0622fcfcba631..897d84e04985d0e003f0f72fe8133df431d75bd8 100644 (file)
@@ -149,6 +149,7 @@ header-y += tiocl.h
 header-y += tipc.h
 header-y += tipc_config.h
 header-y += toshiba.h
+header-y += udf_fs_i.h
 header-y += ultrasound.h
 header-y += un.h
 header-y += utime.h
@@ -336,7 +337,6 @@ unifdef-y += time.h
 unifdef-y += timex.h
 unifdef-y += tty.h
 unifdef-y += types.h
-unifdef-y += udf_fs_i.h
 unifdef-y += udp.h
 unifdef-y += uinput.h
 unifdef-y += uio.h
diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h
deleted file mode 100644 (file)
index aa88654..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * udf_fs.h
- *
- * PURPOSE
- *  Included by fs/filesystems.c
- *
- * DESCRIPTION
- *  OSTA-UDF(tm) = Optical Storage Technology Association
- *  Universal Disk Format.
- *
- *  This code is based on version 2.50 of the UDF specification,
- *  and revision 3 of the ECMA 167 standard [equivalent to ISO 13346].
- *    http://www.osta.org/ *    http://www.ecma.ch/
- *    http://www.iso.org/
- *
- * COPYRIGHT
- *     This file is distributed under the terms of the GNU General Public
- *     License (GPL). Copies of the GPL can be obtained from:
- *             ftp://prep.ai.mit.edu/pub/gnu/GPL
- *     Each contributing author retains all rights to their own work.
- *
- *  (C) 1999-2004 Ben Fennema
- *  (C) 1999-2000 Stelias Computing Inc
- *
- * HISTORY
- *
- */
-
-#ifndef _UDF_FS_H
-#define _UDF_FS_H 1
-
-#define UDF_PREALLOCATE
-#define UDF_DEFAULT_PREALLOC_BLOCKS    8
-
-#undef UDFFS_DEBUG
-
-#ifdef UDFFS_DEBUG
-#define udf_debug(f, a...) \
-       do { \
-               printk (KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \
-                       __FILE__, __LINE__, __FUNCTION__); \
-               printk (f, ##a); \
-       } while (0)
-#else
-#define udf_debug(f, a...) /**/
-#endif
-
-#define udf_info(f, a...) \
-               printk (KERN_INFO "UDF-fs INFO " f, ##a);
-
-#endif /* _UDF_FS_H */
index ffaf05679ffb2dad2e5d4ee58fc899bf35612e3d..3536965913b09262f3bb202088f4ade104fd3417 100644 (file)
@@ -9,41 +9,10 @@
  *             ftp://prep.ai.mit.edu/pub/gnu/GPL
  *     Each contributing author retains all rights to their own work.
  */
-
 #ifndef _UDF_FS_I_H
 #define _UDF_FS_I_H 1
 
-#ifdef __KERNEL__
-
-struct udf_inode_info
-{
-       struct timespec         i_crtime;
-       /* Physical address of inode */
-       kernel_lb_addr          i_location;
-       __u64                   i_unique;
-       __u32                   i_lenEAttr;
-       __u32                   i_lenAlloc;
-       __u64                   i_lenExtents;
-       __u32                   i_next_alloc_block;
-       __u32                   i_next_alloc_goal;
-       unsigned                i_alloc_type : 3;
-       unsigned                i_efe : 1;
-       unsigned                i_use : 1;
-       unsigned                i_strat4096 : 1;
-       unsigned                reserved : 26;
-       union
-       {
-               short_ad        *i_sad;
-               long_ad         *i_lad;
-               __u8            *i_data;
-       } i_ext;
-       struct inode vfs_inode;
-};
-
-#endif
-
 /* exported IOCTLs, we have 'l', 0x40-0x7f */
-
 #define UDF_GETEASIZE   _IOR('l', 0x40, int)
 #define UDF_GETEABLOCK  _IOR('l', 0x41, void *)
 #define UDF_GETVOLIDENT _IOR('l', 0x42, void *)
diff --git a/include/linux/udf_fs_sb.h b/include/linux/udf_fs_sb.h
deleted file mode 100644 (file)
index 9bc4735..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * udf_fs_sb.h
- * 
- * This include file is for the Linux kernel/module.
- *
- * COPYRIGHT
- *     This file is distributed under the terms of the GNU General Public
- *     License (GPL). Copies of the GPL can be obtained from:
- *             ftp://prep.ai.mit.edu/pub/gnu/GPL
- *     Each contributing author retains all rights to their own work.
- */
-
-#ifndef _UDF_FS_SB_H
-#define _UDF_FS_SB_H 1
-
-#include <linux/mutex.h>
-
-#pragma pack(1)
-
-#define UDF_MAX_BLOCK_LOADED   8
-
-#define UDF_TYPE1_MAP15                        0x1511U
-#define UDF_VIRTUAL_MAP15              0x1512U
-#define UDF_VIRTUAL_MAP20              0x2012U
-#define UDF_SPARABLE_MAP15             0x1522U
-
-struct udf_sparing_data
-{
-       __u16   s_packet_len;
-       struct buffer_head *s_spar_map[4];
-};
-
-struct udf_virtual_data
-{
-       __u32   s_num_entries;
-       __u16   s_start_offset;
-};
-
-struct udf_bitmap
-{
-       __u32                   s_extLength;
-       __u32                   s_extPosition;
-       __u16                   s_nr_groups;
-       struct buffer_head      **s_block_bitmap;
-};
-
-struct udf_part_map
-{
-       union
-       {
-               struct udf_bitmap       *s_bitmap;
-               struct inode            *s_table;
-       } s_uspace;
-       union
-       {
-               struct udf_bitmap       *s_bitmap;
-               struct inode            *s_table;
-       } s_fspace;
-       __u32   s_partition_root;
-       __u32   s_partition_len;
-       __u16   s_partition_type;
-       __u16   s_partition_num;
-       union
-       {
-               struct udf_sparing_data s_sparing;
-               struct udf_virtual_data s_virtual;
-       } s_type_specific;
-       __u32   (*s_partition_func)(struct super_block *, __u32, __u16, __u32);
-       __u16   s_volumeseqnum;
-       __u16   s_partition_flags;
-};
-
-#pragma pack()
-
-struct udf_sb_info
-{
-       struct udf_part_map     *s_partmaps;
-       __u8                    s_volume_ident[32];
-
-       /* Overall info */
-       __u16                   s_partitions;
-       __u16                   s_partition;
-
-       /* Sector headers */
-       __s32                   s_session;
-       __u32                   s_anchor[4];
-       __u32                   s_last_block;
-
-       struct buffer_head      *s_lvid_bh;
-
-       /* Default permissions */
-       mode_t                  s_umask;
-       gid_t                   s_gid;
-       uid_t                   s_uid;
-
-       /* Root Info */
-       struct timespec         s_record_time;
-
-       /* Fileset Info */
-       __u16                   s_serial_number;
-
-       /* highest UDF revision we have recorded to this media */
-       __u16                   s_udfrev;
-
-       /* Miscellaneous flags */
-       __u32                   s_flags;
-
-       /* Encoding info */
-       struct nls_table        *s_nls_map;
-
-       /* VAT inode */
-       struct inode            *s_vat_inode;
-
-       struct mutex            s_alloc_mutex;
-};
-
-#endif /* _UDF_FS_SB_H */