Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359283
b: refs/heads/master
c: 6b46419
h: refs/heads/master
i:
  359281: be27f16
  359279: 7e4dbef
v: v3
  • Loading branch information
Oleksij Rempel authored and Linus Torvalds committed Feb 28, 2013
1 parent 8947721 commit 4f5ddfa
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 899bed05e9f6bbb21776f9ebd88f5631987f987a
refs/heads/master: 6b46419b0462ae565880f02e9cd0baf9b25ea71f
8 changes: 4 additions & 4 deletions trunk/fs/fat/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1298,17 +1298,17 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
sbi->prev_free = FAT_START_ENT;
sb->s_maxbytes = 0xffffffff;

if (!sbi->fat_length && b->fat32_length) {
if (!sbi->fat_length && b->fat32.length) {
struct fat_boot_fsinfo *fsinfo;
struct buffer_head *fsinfo_bh;

/* Must be FAT32 */
sbi->fat_bits = 32;
sbi->fat_length = le32_to_cpu(b->fat32_length);
sbi->root_cluster = le32_to_cpu(b->root_cluster);
sbi->fat_length = le32_to_cpu(b->fat32.length);
sbi->root_cluster = le32_to_cpu(b->fat32.root_cluster);

/* MC - if info_sector is 0, don't multiply by 0 */
sbi->fsinfo_sector = le16_to_cpu(b->info_sector);
sbi->fsinfo_sector = le16_to_cpu(b->fat32.info_sector);
if (sbi->fsinfo_sector == 0)
sbi->fsinfo_sector = 1;

Expand Down
36 changes: 28 additions & 8 deletions trunk/include/uapi/linux/msdos_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4f5ddfa

Please sign in to comment.