From 1f89ba5debfd8f0d535dba41be7d7dde247de704 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 25 Jan 2010 13:44:11 -0800 Subject: [PATCH] FAT: use an anonymous union We can use an anonymous union here... we're more or less gcc-specific anyway, and it cleans up the namespace a lot. Signed-off-by: H. Peter Anvin --- core/fs/fat/fat.c | 2 +- core/fs/fat/fat_fs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/fs/fat/fat.c b/core/fs/fat/fat.c index b036ead..405e43a 100644 --- a/core/fs/fat/fat.c +++ b/core/fs/fat/fat.c @@ -723,7 +723,7 @@ static int vfat_fs_init(struct fs_info *fs) fs->fs_info = sbi; this_fs = fs; - sectors_per_fat = fat.bxFATsecs ? : fat.u.fat32.bxFATsecs_32; + sectors_per_fat = fat.bxFATsecs ? : fat.fat32.bxFATsecs_32; total_sectors = fat.bxSectors ? : fat.bsHugeSectors; sbi->fat = fat.bxResSectors; diff --git a/core/fs/fat/fat_fs.h b/core/fs/fat/fat_fs.h index 30bde32..b672a91 100644 --- a/core/fs/fat/fat_fs.h +++ b/core/fs/fat/fat_fs.h @@ -74,7 +74,7 @@ struct fat_bpb { uint8_t fstype[8]; } __attribute__ ((packed)) fat32; - } __attribute__ ((packed)) u; + } __attribute__ ((packed)); uint8_t pad[422]; /* padding to 512 Bytes (one sector) */ -- 2.7.4