From 8dc0e1929e3af3b1673e5a8e486808386400c020 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 16 Sep 2009 00:58:11 +0200 Subject: use PACKED macro insted of open-coding GCC-ism Signed-off-by: Denys Vlasenko --- util-linux/mkfs_vfat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'util-linux/mkfs_vfat.c') 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]; -- cgit v1.2.3