mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
fat: add extended fileds to struct fat_boot_sector
Later we will need "state" field to check if volume was cleanly unmounted. Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> 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>
This commit is contained in:
parent
899bed05e9
commit
6b46419b04
2 changed files with 32 additions and 12 deletions
|
@ -120,14 +120,34 @@ struct fat_boot_sector {
|
|||
__le32 hidden; /* hidden sectors (unused) */
|
||||
__le32 total_sect; /* number of sectors (if sectors == 0) */
|
||||
|
||||
/* The following fields are only used by FAT32 */
|
||||
__le32 fat32_length; /* sectors/FAT */
|
||||
__le16 flags; /* bit 8: fat mirroring, low 4: active fat */
|
||||
__u8 version[2]; /* major, minor filesystem version */
|
||||
__le32 root_cluster; /* first cluster in root directory */
|
||||
__le16 info_sector; /* filesystem info sector */
|
||||
__le16 backup_boot; /* backup boot sector */
|
||||
__le16 reserved2[6]; /* Unused */
|
||||
union {
|
||||
struct {
|
||||
/* Extended BPB Fields for FAT16 */
|
||||
__u8 drive_number; /* Physical drive number */
|
||||
__u8 state; /* undocumented, but used
|
||||
for mount state. */
|
||||
/* other fiealds are not added here */
|
||||
} fat16;
|
||||
|
||||
struct {
|
||||
/* only used by FAT32 */
|
||||
__le32 length; /* sectors/FAT */
|
||||
__le16 flags; /* bit 8: fat mirroring,
|
||||
low 4: active fat */
|
||||
__u8 version[2]; /* major, minor filesystem
|
||||
version */
|
||||
__le32 root_cluster; /* first cluster in
|
||||
root directory */
|
||||
__le16 info_sector; /* filesystem info sector */
|
||||
__le16 backup_boot; /* backup boot sector */
|
||||
__le16 reserved2[6]; /* Unused */
|
||||
/* Extended BPB Fields for FAT32 */
|
||||
__u8 drive_number; /* Physical drive number */
|
||||
__u8 state; /* undocumented, but used
|
||||
for mount state. */
|
||||
/* other fiealds are not added here */
|
||||
} fat32;
|
||||
};
|
||||
};
|
||||
|
||||
struct fat_boot_fsinfo {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue