diff options
author | Brian Swetland <swetland@google.com> | 2010-10-25 13:38:08 +0800 |
---|---|---|
committer | Lily Zhang <r58066@freescale.com> | 2010-11-22 09:38:49 +0800 |
commit | 32c6b90e486b312f80bca1b72e582257b44e946e (patch) | |
tree | a18ab669d140a4edd5bd8cc61e58b03643b837ef /include | |
parent | 7bacd63f2f0a5d2aeed021f4508da27d699ac065 (diff) |
Android fat: Add new ioctl VFAT_IOCTL_GET_VOLUME_ID for reading the volume ID.
The volume id is the serial number stored in the fat boot sector.
Signed-off-by: Brian Swetland <swetland@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/msdos_fs.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 34066e65fdeb..f38d4f0a5ae8 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h @@ -101,6 +101,7 @@ struct __fat_dirent { /* <linux/videotext.h> has used 0x72 ('r') in collision, so skip a few */ #define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32) #define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32) +#define VFAT_IOCTL_GET_VOLUME_ID _IOR('r', 0x12, __u32) struct fat_boot_sector { __u8 ignored[3]; /* Boot strap short or near jump */ @@ -138,6 +139,17 @@ struct fat_boot_fsinfo { __le32 reserved2[4]; }; +struct fat_boot_bsx { + __u8 drive; /* drive number */ + __u8 reserved1; + __u8 signature; /* extended boot signature */ + __u8 vol_id[4]; /* volume ID */ + __u8 vol_label[11]; /* volume label */ + __u8 type[8]; /* file system type */ +}; +#define FAT16_BSX_OFFSET 36 /* offset of fat_boot_bsx in FAT12 and FAT16 */ +#define FAT32_BSX_OFFSET 64 /* offset of fat_boot_bsx in FAT32 */ + struct msdos_dir_entry { __u8 name[MSDOS_NAME];/* name and extension */ __u8 attr; /* attribute bits */ |