diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-16 02:58:11 +0400 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-16 02:58:11 +0400 |
commit | 8dc0e1929e3af3b1673e5a8e486808386400c020 (patch) | |
tree | 0550684999338af8f15de76c5599f9dead3fdfd6 /util-linux/mkfs_vfat.c | |
parent | f2c184be835fbcbd04d06fce22783c6a5d37b563 (diff) |
use PACKED macro insted of open-coding GCC-ism
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/mkfs_vfat.c')
-rw-r--r-- | util-linux/mkfs_vfat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c index bdd4dd803..10de2af5b 100644 --- a/util-linux/mkfs_vfat.c +++ b/util-linux/mkfs_vfat.c @@ -79,7 +79,7 @@ struct msdos_dir_entry { uint16_t date; /* 018 date */ uint16_t start; /* 01a first cluster */ uint32_t size; /* 01c file size in bytes */ -} __attribute__ ((packed)); +} PACKED; /* Example of boot sector's beginning: 0000 eb 58 90 4d 53 57 49 4e 34 2e 31 00 02 08 26 00 |...MSWIN4.1...&.| @@ -96,7 +96,7 @@ struct msdos_volume_info { /* (offsets are relative to start of boot sector) */ uint32_t volume_id32; /* 043 volume ID number */ char volume_label[11];/* 047 volume label */ char fs_type[8]; /* 052 typically "FATnn" */ -} __attribute__ ((packed)); /* 05a end. Total size 26 (0x1a) bytes */ +} PACKED; /* 05a end. Total size 26 (0x1a) bytes */ struct msdos_boot_sector { char boot_jump[3]; /* 000 short or near jump instruction */ @@ -124,7 +124,7 @@ struct msdos_boot_sector { char boot_code[0x200 - 0x5a - 2]; /* 05a */ #define BOOT_SIGN 0xAA55 uint16_t boot_sign; /* 1fe */ -} __attribute__ ((packed)); +} PACKED; #define FAT_FSINFO_SIG1 0x41615252 #define FAT_FSINFO_SIG2 0x61417272 @@ -137,7 +137,7 @@ struct fat32_fsinfo { uint32_t reserved2[3]; uint16_t reserved3; /* 1fc */ uint16_t boot_sign; /* 1fe */ -} __attribute__ ((packed)); +} PACKED; struct bug_check { char BUG1[sizeof(struct msdos_dir_entry ) == 0x20 ? 1 : -1]; |