aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2008-11-06 15:53:54 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-06 18:41:21 -0500
commit9c0aa1b87bf541affef519eb4879ce7c5a5941ae (patch)
tree3bd583d8331c630b59fc01b68ab9cb34bb953d6e /include
parent45cfbe354785a5bc9a38354754d6f7322f598001 (diff)
fat: Cleanup FAT attribute stuff
This adds three helpers: fat_make_attrs() - makes FAT attributes from inode. fat_make_mode() - makes mode_t from FAT attributes. fat_save_attrs() - saves FAT attributes to inode. Then this replaces: MSDOS_MKMODE() by fat_make_mode(), fat_attr() by fat_make_attrs(), ->i_attrs = attr & ATTR_UNUSED by fat_save_attrs(). And for root inode, those is used with ATTR_DIR instead of bogus ATTR_NONE. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/msdos_fs.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index 0982fb47a90d..e0a9b207920d 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -46,11 +46,6 @@
46#define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ 46#define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */
47#define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) 47#define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG)
48 48
49/* valid file mode bits */
50#define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)
51/* Convert attribute bits and a mask to the UNIX mode. */
52#define MSDOS_MKMODE(a, m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO))
53
54#define MSDOS_NAME 11 /* maximum name length */ 49#define MSDOS_NAME 11 /* maximum name length */
55#define MSDOS_LONGNAME 256 /* maximum name length */ 50#define MSDOS_LONGNAME 256 /* maximum name length */
56#define MSDOS_SLOTS 21 /* max # of slots for short and long names */ 51#define MSDOS_SLOTS 21 /* max # of slots for short and long names */