diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-28 18:07:55 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-28 18:07:55 -0400 |
commit | cb28a1bbdb4790378e7366d6c9ee1d2340b84f92 (patch) | |
tree | 316436f77dac75335fd2c3ef5f109e71606c50d3 /include/linux/msdos_fs.h | |
parent | b6d4f7e3ef25beb8c658c97867d98883e69dc544 (diff) | |
parent | f934fb19ef34730263e6afc01e8ec27a8a71470f (diff) |
Merge branch 'linus' into core/generic-dma-coherent
Conflicts:
arch/x86/Kconfig
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/msdos_fs.h')
-rw-r--r-- | include/linux/msdos_fs.h | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 81cd36b735b0..ba63858056c7 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -2,11 +2,11 @@ | |||
2 | #define _LINUX_MSDOS_FS_H | 2 | #define _LINUX_MSDOS_FS_H |
3 | 3 | ||
4 | #include <linux/magic.h> | 4 | #include <linux/magic.h> |
5 | #include <asm/byteorder.h> | ||
5 | 6 | ||
6 | /* | 7 | /* |
7 | * The MS-DOS filesystem constants/structures | 8 | * The MS-DOS filesystem constants/structures |
8 | */ | 9 | */ |
9 | #include <asm/byteorder.h> | ||
10 | 10 | ||
11 | #define SECTOR_SIZE 512 /* sector size (bytes) */ | 11 | #define SECTOR_SIZE 512 /* sector size (bytes) */ |
12 | #define SECTOR_BITS 9 /* log2(SECTOR_SIZE) */ | 12 | #define SECTOR_BITS 9 /* log2(SECTOR_SIZE) */ |
@@ -89,24 +89,22 @@ | |||
89 | #define IS_FSINFO(x) (le32_to_cpu((x)->signature1) == FAT_FSINFO_SIG1 \ | 89 | #define IS_FSINFO(x) (le32_to_cpu((x)->signature1) == FAT_FSINFO_SIG1 \ |
90 | && le32_to_cpu((x)->signature2) == FAT_FSINFO_SIG2) | 90 | && le32_to_cpu((x)->signature2) == FAT_FSINFO_SIG2) |
91 | 91 | ||
92 | struct __fat_dirent { | ||
93 | long d_ino; | ||
94 | __kernel_off_t d_off; | ||
95 | unsigned short d_reclen; | ||
96 | char d_name[256]; /* We must not include limits.h! */ | ||
97 | }; | ||
98 | |||
92 | /* | 99 | /* |
93 | * ioctl commands | 100 | * ioctl commands |
94 | */ | 101 | */ |
95 | #define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct dirent [2]) | 102 | #define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct __fat_dirent[2]) |
96 | #define VFAT_IOCTL_READDIR_SHORT _IOR('r', 2, struct dirent [2]) | 103 | #define VFAT_IOCTL_READDIR_SHORT _IOR('r', 2, struct __fat_dirent[2]) |
97 | /* <linux/videotext.h> has used 0x72 ('r') in collision, so skip a few */ | 104 | /* <linux/videotext.h> has used 0x72 ('r') in collision, so skip a few */ |
98 | #define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32) | 105 | #define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32) |
99 | #define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32) | 106 | #define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32) |
100 | 107 | ||
101 | /* | ||
102 | * vfat shortname flags | ||
103 | */ | ||
104 | #define VFAT_SFN_DISPLAY_LOWER 0x0001 /* convert to lowercase for display */ | ||
105 | #define VFAT_SFN_DISPLAY_WIN95 0x0002 /* emulate win95 rule for display */ | ||
106 | #define VFAT_SFN_DISPLAY_WINNT 0x0004 /* emulate winnt rule for display */ | ||
107 | #define VFAT_SFN_CREATE_WIN95 0x0100 /* emulate win95 rule for create */ | ||
108 | #define VFAT_SFN_CREATE_WINNT 0x0200 /* emulate winnt rule for create */ | ||
109 | |||
110 | struct fat_boot_sector { | 108 | struct fat_boot_sector { |
111 | __u8 ignored[3]; /* Boot strap short or near jump */ | 109 | __u8 ignored[3]; /* Boot strap short or near jump */ |
112 | __u8 system_id[8]; /* Name - can be used to special case | 110 | __u8 system_id[8]; /* Name - can be used to special case |
@@ -168,14 +166,6 @@ struct msdos_dir_slot { | |||
168 | __u8 name11_12[4]; /* last 2 characters in name */ | 166 | __u8 name11_12[4]; /* last 2 characters in name */ |
169 | }; | 167 | }; |
170 | 168 | ||
171 | struct fat_slot_info { | ||
172 | loff_t i_pos; /* on-disk position of directory entry */ | ||
173 | loff_t slot_off; /* offset for slot or de start */ | ||
174 | int nr_slots; /* number of slots + 1(de) in filename */ | ||
175 | struct msdos_dir_entry *de; | ||
176 | struct buffer_head *bh; | ||
177 | }; | ||
178 | |||
179 | #ifdef __KERNEL__ | 169 | #ifdef __KERNEL__ |
180 | 170 | ||
181 | #include <linux/buffer_head.h> | 171 | #include <linux/buffer_head.h> |
@@ -184,6 +174,15 @@ struct fat_slot_info { | |||
184 | #include <linux/fs.h> | 174 | #include <linux/fs.h> |
185 | #include <linux/mutex.h> | 175 | #include <linux/mutex.h> |
186 | 176 | ||
177 | /* | ||
178 | * vfat shortname flags | ||
179 | */ | ||
180 | #define VFAT_SFN_DISPLAY_LOWER 0x0001 /* convert to lowercase for display */ | ||
181 | #define VFAT_SFN_DISPLAY_WIN95 0x0002 /* emulate win95 rule for display */ | ||
182 | #define VFAT_SFN_DISPLAY_WINNT 0x0004 /* emulate winnt rule for display */ | ||
183 | #define VFAT_SFN_CREATE_WIN95 0x0100 /* emulate win95 rule for create */ | ||
184 | #define VFAT_SFN_CREATE_WINNT 0x0200 /* emulate winnt rule for create */ | ||
185 | |||
187 | struct fat_mount_options { | 186 | struct fat_mount_options { |
188 | uid_t fs_uid; | 187 | uid_t fs_uid; |
189 | gid_t fs_gid; | 188 | gid_t fs_gid; |
@@ -202,10 +201,10 @@ struct fat_mount_options { | |||
202 | utf8:1, /* Use of UTF-8 character set (Default) */ | 201 | utf8:1, /* Use of UTF-8 character set (Default) */ |
203 | unicode_xlate:1, /* create escape sequences for unhandled Unicode */ | 202 | unicode_xlate:1, /* create escape sequences for unhandled Unicode */ |
204 | numtail:1, /* Does first alias have a numeric '~1' type tail? */ | 203 | numtail:1, /* Does first alias have a numeric '~1' type tail? */ |
205 | atari:1, /* Use Atari GEMDOS variation of MS-DOS fs */ | ||
206 | flush:1, /* write things quickly */ | 204 | flush:1, /* write things quickly */ |
207 | nocase:1, /* Does this need case conversion? 0=need case conversion*/ | 205 | nocase:1, /* Does this need case conversion? 0=need case conversion*/ |
208 | usefree:1; /* Use free_clusters for FAT32 */ | 206 | usefree:1, /* Use free_clusters for FAT32 */ |
207 | tz_utc:1; /* Filesystem timestamps are in UTC */ | ||
209 | }; | 208 | }; |
210 | 209 | ||
211 | #define FAT_HASH_BITS 8 | 210 | #define FAT_HASH_BITS 8 |
@@ -267,6 +266,14 @@ struct msdos_inode_info { | |||
267 | struct inode vfs_inode; | 266 | struct inode vfs_inode; |
268 | }; | 267 | }; |
269 | 268 | ||
269 | struct fat_slot_info { | ||
270 | loff_t i_pos; /* on-disk position of directory entry */ | ||
271 | loff_t slot_off; /* offset for slot or de start */ | ||
272 | int nr_slots; /* number of slots + 1(de) in filename */ | ||
273 | struct msdos_dir_entry *de; | ||
274 | struct buffer_head *bh; | ||
275 | }; | ||
276 | |||
270 | static inline struct msdos_sb_info *MSDOS_SB(struct super_block *sb) | 277 | static inline struct msdos_sb_info *MSDOS_SB(struct super_block *sb) |
271 | { | 278 | { |
272 | return sb->s_fs_info; | 279 | return sb->s_fs_info; |
@@ -428,8 +435,9 @@ extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, | |||
428 | extern void fat_fs_panic(struct super_block *s, const char *fmt, ...); | 435 | extern void fat_fs_panic(struct super_block *s, const char *fmt, ...); |
429 | extern void fat_clusters_flush(struct super_block *sb); | 436 | extern void fat_clusters_flush(struct super_block *sb); |
430 | extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); | 437 | extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); |
431 | extern int date_dos2unix(unsigned short time, unsigned short date); | 438 | extern int date_dos2unix(unsigned short time, unsigned short date, int tz_utc); |
432 | extern void fat_date_unix2dos(int unix_date, __le16 *time, __le16 *date); | 439 | extern void fat_date_unix2dos(int unix_date, __le16 *time, __le16 *date, |
440 | int tz_utc); | ||
433 | extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs); | 441 | extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs); |
434 | 442 | ||
435 | int fat_cache_init(void); | 443 | int fat_cache_init(void); |