[syslinux:fsc] FAT: use an anonymous union

syslinux-bot for H. Peter Anvin hpa at zytor.com
Mon Jan 25 14:57:09 PST 2010


Commit-ID:  1f89ba5debfd8f0d535dba41be7d7dde247de704
Gitweb:     http://syslinux.zytor.com/commit/1f89ba5debfd8f0d535dba41be7d7dde247de704
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Mon, 25 Jan 2010 13:44:11 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Mon, 25 Jan 2010 13:44:11 -0800

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 <hpa at zytor.com>


---
 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) */
 



More information about the Syslinux-commits mailing list