aboutsummaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2008-03-15 13:29:36 -0400
committerArve Hjønnevåg <arve@android.com>2013-07-01 13:40:20 -0700
commit68d0e19e91b0904a707073a20a2edd63b9b2d264 (patch)
tree00a10cbc935dcfe3797949cde9a3b187bbec1777 /include/uapi
parent5a5f2f9219cf1df0cbd14542c5c709e34653d7f9 (diff)
FAT: Add new ioctl VFAT_IOCTL_GET_VOLUME_ID for reading the volume ID.
Signed-off-by: Brian Swetland <swetland@google.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/msdos_fs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/uapi/linux/msdos_fs.h b/include/uapi/linux/msdos_fs.h
index f055e58b314..db4ae0cd16c 100644
--- a/include/uapi/linux/msdos_fs.h
+++ b/include/uapi/linux/msdos_fs.h
@@ -104,6 +104,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 */
@@ -161,6 +162,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 */