aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/msdos_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/msdos_fs.h')
-rw-r--r--include/linux/msdos_fs.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index f950921523f5..b03b27457413 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -58,7 +58,11 @@
58#define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ 58#define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */
59 59
60/* media of boot sector */ 60/* media of boot sector */
61#define FAT_VALID_MEDIA(x) ((0xF8 <= (x) && (x) <= 0xFF) || (x) == 0xF0) 61static inline int fat_valid_media(u8 media)
62{
63 return 0xf8 <= media || media == 0xf0;
64}
65
62#define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ 66#define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \
63 MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x)) 67 MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x))
64 68
@@ -195,6 +199,7 @@ struct fat_mount_options {
195 char *iocharset; /* Charset used for filename input/display */ 199 char *iocharset; /* Charset used for filename input/display */
196 unsigned short shortname; /* flags for shortname display/create rule */ 200 unsigned short shortname; /* flags for shortname display/create rule */
197 unsigned char name_check; /* r = relaxed, n = normal, s = strict */ 201 unsigned char name_check; /* r = relaxed, n = normal, s = strict */
202 unsigned short allow_utime;/* permission for setting the [am]time */
198 unsigned quiet:1, /* set = fake successful chmods and chowns */ 203 unsigned quiet:1, /* set = fake successful chmods and chowns */
199 showexec:1, /* set = only set x bit for com/exe/bat */ 204 showexec:1, /* set = only set x bit for com/exe/bat */
200 sys_immutable:1, /* set = system files are immutable */ 205 sys_immutable:1, /* set = system files are immutable */
@@ -232,6 +237,7 @@ struct msdos_sb_info {
232 struct mutex fat_lock; 237 struct mutex fat_lock;
233 unsigned int prev_free; /* previously allocated cluster number */ 238 unsigned int prev_free; /* previously allocated cluster number */
234 unsigned int free_clusters; /* -1 if undefined */ 239 unsigned int free_clusters; /* -1 if undefined */
240 unsigned int free_clus_valid; /* is free_clusters valid? */
235 struct fat_mount_options options; 241 struct fat_mount_options options;
236 struct nls_table *nls_disk; /* Codepage used on disk */ 242 struct nls_table *nls_disk; /* Codepage used on disk */
237 struct nls_table *nls_io; /* Charset used for input and display */ 243 struct nls_table *nls_io; /* Charset used for input and display */
@@ -401,7 +407,7 @@ extern int fat_generic_ioctl(struct inode *inode, struct file *filp,
401 unsigned int cmd, unsigned long arg); 407 unsigned int cmd, unsigned long arg);
402extern const struct file_operations fat_file_operations; 408extern const struct file_operations fat_file_operations;
403extern const struct inode_operations fat_file_inode_operations; 409extern const struct inode_operations fat_file_inode_operations;
404extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); 410extern int fat_setattr(struct dentry * dentry, struct iattr * attr);
405extern void fat_truncate(struct inode *inode); 411extern void fat_truncate(struct inode *inode);
406extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, 412extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry,
407 struct kstat *stat); 413 struct kstat *stat);