diff options
31 files changed, 70 insertions, 70 deletions
diff --git a/archival/libunarchive/decompress_unlzma.c b/archival/libunarchive/decompress_unlzma.c index 4478cd2e3..ecda17481 100644 --- a/archival/libunarchive/decompress_unlzma.c +++ b/archival/libunarchive/decompress_unlzma.c | |||
@@ -156,7 +156,7 @@ typedef struct { | |||
156 | uint8_t pos; | 156 | uint8_t pos; |
157 | uint32_t dict_size; | 157 | uint32_t dict_size; |
158 | uint64_t dst_size; | 158 | uint64_t dst_size; |
159 | } __attribute__ ((packed)) lzma_header_t; | 159 | } PACKED lzma_header_t; |
160 | 160 | ||
161 | 161 | ||
162 | /* #defines will force compiler to compute/optimize each one with each usage. | 162 | /* #defines will force compiler to compute/optimize each one with each usage. |
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c index b090f26eb..c571ab438 100644 --- a/archival/libunarchive/decompress_unzip.c +++ b/archival/libunarchive/decompress_unzip.c | |||
@@ -1117,7 +1117,7 @@ static int check_header_gzip(STATE_PARAM unpack_info_t *info) | |||
1117 | uint32_t mtime; | 1117 | uint32_t mtime; |
1118 | uint8_t xtra_flags_UNUSED; | 1118 | uint8_t xtra_flags_UNUSED; |
1119 | uint8_t os_flags_UNUSED; | 1119 | uint8_t os_flags_UNUSED; |
1120 | } __attribute__((packed)) formatted; | 1120 | } PACKED formatted; |
1121 | } header; | 1121 | } header; |
1122 | struct BUG_header { | 1122 | struct BUG_header { |
1123 | char BUG_header[sizeof(header) == 8 ? 1 : -1]; | 1123 | char BUG_header[sizeof(header) == 8 ? 1 : -1]; |
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 { | |||
79 | uint16_t date; /* 018 date */ | 79 | uint16_t date; /* 018 date */ |
80 | uint16_t start; /* 01a first cluster */ | 80 | uint16_t start; /* 01a first cluster */ |
81 | uint32_t size; /* 01c file size in bytes */ | 81 | uint32_t size; /* 01c file size in bytes */ |
82 | } __attribute__ ((packed)); | 82 | } PACKED; |
83 | 83 | ||
84 | /* Example of boot sector's beginning: | 84 | /* Example of boot sector's beginning: |
85 | 0000 eb 58 90 4d 53 57 49 4e 34 2e 31 00 02 08 26 00 |...MSWIN4.1...&.| | 85 | 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) */ | |||
96 | uint32_t volume_id32; /* 043 volume ID number */ | 96 | uint32_t volume_id32; /* 043 volume ID number */ |
97 | char volume_label[11];/* 047 volume label */ | 97 | char volume_label[11];/* 047 volume label */ |
98 | char fs_type[8]; /* 052 typically "FATnn" */ | 98 | char fs_type[8]; /* 052 typically "FATnn" */ |
99 | } __attribute__ ((packed)); /* 05a end. Total size 26 (0x1a) bytes */ | 99 | } PACKED; /* 05a end. Total size 26 (0x1a) bytes */ |
100 | 100 | ||
101 | struct msdos_boot_sector { | 101 | struct msdos_boot_sector { |
102 | char boot_jump[3]; /* 000 short or near jump instruction */ | 102 | char boot_jump[3]; /* 000 short or near jump instruction */ |
@@ -124,7 +124,7 @@ struct msdos_boot_sector { | |||
124 | char boot_code[0x200 - 0x5a - 2]; /* 05a */ | 124 | char boot_code[0x200 - 0x5a - 2]; /* 05a */ |
125 | #define BOOT_SIGN 0xAA55 | 125 | #define BOOT_SIGN 0xAA55 |
126 | uint16_t boot_sign; /* 1fe */ | 126 | uint16_t boot_sign; /* 1fe */ |
127 | } __attribute__ ((packed)); | 127 | } PACKED; |
128 | 128 | ||
129 | #define FAT_FSINFO_SIG1 0x41615252 | 129 | #define FAT_FSINFO_SIG1 0x41615252 |
130 | #define FAT_FSINFO_SIG2 0x61417272 | 130 | #define FAT_FSINFO_SIG2 0x61417272 |
@@ -137,7 +137,7 @@ struct fat32_fsinfo { | |||
137 | uint32_t reserved2[3]; | 137 | uint32_t reserved2[3]; |
138 | uint16_t reserved3; /* 1fc */ | 138 | uint16_t reserved3; /* 1fc */ |
139 | uint16_t boot_sign; /* 1fe */ | 139 | uint16_t boot_sign; /* 1fe */ |
140 | } __attribute__ ((packed)); | 140 | } PACKED; |
141 | 141 | ||
142 | struct bug_check { | 142 | struct bug_check { |
143 | char BUG1[sizeof(struct msdos_dir_entry ) == 0x20 ? 1 : -1]; | 143 | char BUG1[sizeof(struct msdos_dir_entry ) == 0x20 ? 1 : -1]; |
diff --git a/util-linux/volume_id/cramfs.c b/util-linux/volume_id/cramfs.c index dd939e494..37b991105 100644 --- a/util-linux/volume_id/cramfs.c +++ b/util-linux/volume_id/cramfs.c | |||
@@ -31,9 +31,9 @@ struct cramfs_super { | |||
31 | uint32_t edition; | 31 | uint32_t edition; |
32 | uint32_t blocks; | 32 | uint32_t blocks; |
33 | uint32_t files; | 33 | uint32_t files; |
34 | } __attribute__((__packed__)) info; | 34 | } PACKED info; |
35 | uint8_t name[16]; | 35 | uint8_t name[16]; |
36 | } __attribute__((__packed__)); | 36 | } PACKED; |
37 | 37 | ||
38 | int volume_id_probe_cramfs(struct volume_id *id /*,uint64_t off*/) | 38 | int volume_id_probe_cramfs(struct volume_id *id /*,uint64_t off*/) |
39 | { | 39 | { |
diff --git a/util-linux/volume_id/ext.c b/util-linux/volume_id/ext.c index b052e04ce..e4097737b 100644 --- a/util-linux/volume_id/ext.c +++ b/util-linux/volume_id/ext.c | |||
@@ -37,7 +37,7 @@ struct ext2_super_block { | |||
37 | uint32_t feature_ro_compat; | 37 | uint32_t feature_ro_compat; |
38 | uint8_t uuid[16]; | 38 | uint8_t uuid[16]; |
39 | uint8_t volume_name[16]; | 39 | uint8_t volume_name[16]; |
40 | } __attribute__((__packed__)); | 40 | } PACKED; |
41 | 41 | ||
42 | #define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x00000004 | 42 | #define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x00000004 |
43 | #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x00000008 | 43 | #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x00000008 |
diff --git a/util-linux/volume_id/fat.c b/util-linux/volume_id/fat.c index 352040f57..8cf429ec5 100644 --- a/util-linux/volume_id/fat.c +++ b/util-linux/volume_id/fat.c | |||
@@ -54,7 +54,7 @@ struct vfat_super_block { | |||
54 | uint8_t magic[8]; | 54 | uint8_t magic[8]; |
55 | uint8_t dummy2[192]; | 55 | uint8_t dummy2[192]; |
56 | uint8_t pmagic[2]; | 56 | uint8_t pmagic[2]; |
57 | } __attribute__((__packed__)) fat; | 57 | } PACKED fat; |
58 | struct fat32_super_block { | 58 | struct fat32_super_block { |
59 | uint32_t fat32_length; | 59 | uint32_t fat32_length; |
60 | uint16_t flags; | 60 | uint16_t flags; |
@@ -69,9 +69,9 @@ struct vfat_super_block { | |||
69 | uint8_t magic[8]; | 69 | uint8_t magic[8]; |
70 | uint8_t dummy2[164]; | 70 | uint8_t dummy2[164]; |
71 | uint8_t pmagic[2]; | 71 | uint8_t pmagic[2]; |
72 | } __attribute__((__packed__)) fat32; | 72 | } PACKED fat32; |
73 | } __attribute__((__packed__)) type; | 73 | } PACKED type; |
74 | } __attribute__((__packed__)); | 74 | } PACKED; |
75 | 75 | ||
76 | struct vfat_dir_entry { | 76 | struct vfat_dir_entry { |
77 | uint8_t name[11]; | 77 | uint8_t name[11]; |
@@ -85,7 +85,7 @@ struct vfat_dir_entry { | |||
85 | uint16_t date_write; | 85 | uint16_t date_write; |
86 | uint16_t cluster_low; | 86 | uint16_t cluster_low; |
87 | uint32_t size; | 87 | uint32_t size; |
88 | } __attribute__((__packed__)); | 88 | } PACKED; |
89 | 89 | ||
90 | static uint8_t *get_attr_volume_id(struct vfat_dir_entry *dir, int count) | 90 | static uint8_t *get_attr_volume_id(struct vfat_dir_entry *dir, int count) |
91 | { | 91 | { |
diff --git a/util-linux/volume_id/hfs.c b/util-linux/volume_id/hfs.c index f99b895c4..71a5e8b09 100644 --- a/util-linux/volume_id/hfs.c +++ b/util-linux/volume_id/hfs.c | |||
@@ -28,7 +28,7 @@ struct hfs_finder_info{ | |||
28 | uint32_t reserved; | 28 | uint32_t reserved; |
29 | uint32_t osx_folder; | 29 | uint32_t osx_folder; |
30 | uint8_t id[8]; | 30 | uint8_t id[8]; |
31 | } __attribute__((__packed__)); | 31 | } PACKED; |
32 | 32 | ||
33 | struct hfs_mdb { | 33 | struct hfs_mdb { |
34 | uint8_t signature[2]; | 34 | uint8_t signature[2]; |
@@ -58,7 +58,7 @@ struct hfs_mdb { | |||
58 | uint8_t embed_sig[2]; | 58 | uint8_t embed_sig[2]; |
59 | uint16_t embed_startblock; | 59 | uint16_t embed_startblock; |
60 | uint16_t embed_blockcount; | 60 | uint16_t embed_blockcount; |
61 | } __attribute__((__packed__)); | 61 | } PACKED; |
62 | 62 | ||
63 | struct hfsplus_bnode_descriptor { | 63 | struct hfsplus_bnode_descriptor { |
64 | uint32_t next; | 64 | uint32_t next; |
@@ -67,7 +67,7 @@ struct hfsplus_bnode_descriptor { | |||
67 | uint8_t height; | 67 | uint8_t height; |
68 | uint16_t num_recs; | 68 | uint16_t num_recs; |
69 | uint16_t reserved; | 69 | uint16_t reserved; |
70 | } __attribute__((__packed__)); | 70 | } PACKED; |
71 | 71 | ||
72 | struct hfsplus_bheader_record { | 72 | struct hfsplus_bheader_record { |
73 | uint16_t depth; | 73 | uint16_t depth; |
@@ -76,19 +76,19 @@ struct hfsplus_bheader_record { | |||
76 | uint32_t leaf_head; | 76 | uint32_t leaf_head; |
77 | uint32_t leaf_tail; | 77 | uint32_t leaf_tail; |
78 | uint16_t node_size; | 78 | uint16_t node_size; |
79 | } __attribute__((__packed__)); | 79 | } PACKED; |
80 | 80 | ||
81 | struct hfsplus_catalog_key { | 81 | struct hfsplus_catalog_key { |
82 | uint16_t key_len; | 82 | uint16_t key_len; |
83 | uint32_t parent_id; | 83 | uint32_t parent_id; |
84 | uint16_t unicode_len; | 84 | uint16_t unicode_len; |
85 | uint8_t unicode[255 * 2]; | 85 | uint8_t unicode[255 * 2]; |
86 | } __attribute__((__packed__)); | 86 | } PACKED; |
87 | 87 | ||
88 | struct hfsplus_extent { | 88 | struct hfsplus_extent { |
89 | uint32_t start_block; | 89 | uint32_t start_block; |
90 | uint32_t block_count; | 90 | uint32_t block_count; |
91 | } __attribute__((__packed__)); | 91 | } PACKED; |
92 | 92 | ||
93 | #define HFSPLUS_EXTENT_COUNT 8 | 93 | #define HFSPLUS_EXTENT_COUNT 8 |
94 | struct hfsplus_fork { | 94 | struct hfsplus_fork { |
@@ -96,7 +96,7 @@ struct hfsplus_fork { | |||
96 | uint32_t clump_size; | 96 | uint32_t clump_size; |
97 | uint32_t total_blocks; | 97 | uint32_t total_blocks; |
98 | struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT]; | 98 | struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT]; |
99 | } __attribute__((__packed__)); | 99 | } PACKED; |
100 | 100 | ||
101 | struct hfsplus_vol_header { | 101 | struct hfsplus_vol_header { |
102 | uint8_t signature[2]; | 102 | uint8_t signature[2]; |
@@ -125,7 +125,7 @@ struct hfsplus_vol_header { | |||
125 | struct hfsplus_fork cat_file; | 125 | struct hfsplus_fork cat_file; |
126 | struct hfsplus_fork attr_file; | 126 | struct hfsplus_fork attr_file; |
127 | struct hfsplus_fork start_file; | 127 | struct hfsplus_fork start_file; |
128 | } __attribute__((__packed__)); | 128 | } PACKED; |
129 | 129 | ||
130 | #define HFS_SUPERBLOCK_OFFSET 0x400 | 130 | #define HFS_SUPERBLOCK_OFFSET 0x400 |
131 | #define HFS_NODE_LEAF 0xff | 131 | #define HFS_NODE_LEAF 0xff |
diff --git a/util-linux/volume_id/iso9660.c b/util-linux/volume_id/iso9660.c index 82f5e4846..76fa546bf 100644 --- a/util-linux/volume_id/iso9660.c +++ b/util-linux/volume_id/iso9660.c | |||
@@ -38,14 +38,14 @@ struct iso_volume_descriptor { | |||
38 | uint8_t unused[8]; | 38 | uint8_t unused[8]; |
39 | uint8_t space_size[8]; | 39 | uint8_t space_size[8]; |
40 | uint8_t escape_sequences[8]; | 40 | uint8_t escape_sequences[8]; |
41 | } __attribute__((__packed__)); | 41 | } PACKED; |
42 | 42 | ||
43 | struct high_sierra_volume_descriptor { | 43 | struct high_sierra_volume_descriptor { |
44 | uint8_t foo[8]; | 44 | uint8_t foo[8]; |
45 | uint8_t type; | 45 | uint8_t type; |
46 | uint8_t id[4]; | 46 | uint8_t id[4]; |
47 | uint8_t version; | 47 | uint8_t version; |
48 | } __attribute__((__packed__)); | 48 | } PACKED; |
49 | 49 | ||
50 | int volume_id_probe_iso9660(struct volume_id *id /*,uint64_t off*/) | 50 | int volume_id_probe_iso9660(struct volume_id *id /*,uint64_t off*/) |
51 | { | 51 | { |
diff --git a/util-linux/volume_id/jfs.c b/util-linux/volume_id/jfs.c index 4c39e537a..eb6008fc4 100644 --- a/util-linux/volume_id/jfs.c +++ b/util-linux/volume_id/jfs.c | |||
@@ -31,7 +31,7 @@ struct jfs_super_block { | |||
31 | uint8_t uuid[16]; | 31 | uint8_t uuid[16]; |
32 | uint8_t label[16]; | 32 | uint8_t label[16]; |
33 | uint8_t loguuid[16]; | 33 | uint8_t loguuid[16]; |
34 | } __attribute__((__packed__)); | 34 | } PACKED; |
35 | 35 | ||
36 | #define JFS_SUPERBLOCK_OFFSET 0x8000 | 36 | #define JFS_SUPERBLOCK_OFFSET 0x8000 |
37 | 37 | ||
diff --git a/util-linux/volume_id/linux_raid.c b/util-linux/volume_id/linux_raid.c index cc024692c..b691f2037 100644 --- a/util-linux/volume_id/linux_raid.c +++ b/util-linux/volume_id/linux_raid.c | |||
@@ -37,7 +37,7 @@ struct mdp_super_block { | |||
37 | uint32_t set_uuid1; | 37 | uint32_t set_uuid1; |
38 | uint32_t set_uuid2; | 38 | uint32_t set_uuid2; |
39 | uint32_t set_uuid3; | 39 | uint32_t set_uuid3; |
40 | } __attribute__((packed)); | 40 | } PACKED; |
41 | 41 | ||
42 | #define MD_RESERVED_BYTES 0x10000 | 42 | #define MD_RESERVED_BYTES 0x10000 |
43 | #define MD_MAGIC 0xa92b4efc | 43 | #define MD_MAGIC 0xa92b4efc |
diff --git a/util-linux/volume_id/linux_swap.c b/util-linux/volume_id/linux_swap.c index c9b62e9bf..7ae451649 100644 --- a/util-linux/volume_id/linux_swap.c +++ b/util-linux/volume_id/linux_swap.c | |||
@@ -27,7 +27,7 @@ struct swap_header_v1_2 { | |||
27 | uint32_t nr_badpages; | 27 | uint32_t nr_badpages; |
28 | uint8_t uuid[16]; | 28 | uint8_t uuid[16]; |
29 | uint8_t volume_name[16]; | 29 | uint8_t volume_name[16]; |
30 | } __attribute__((__packed__)); | 30 | } PACKED; |
31 | 31 | ||
32 | #define LARGEST_PAGESIZE 0x4000 | 32 | #define LARGEST_PAGESIZE 0x4000 |
33 | 33 | ||
diff --git a/util-linux/volume_id/ntfs.c b/util-linux/volume_id/ntfs.c index 6e8f1dd3d..3b3e97347 100644 --- a/util-linux/volume_id/ntfs.c +++ b/util-linux/volume_id/ntfs.c | |||
@@ -45,7 +45,7 @@ struct ntfs_super_block { | |||
45 | uint8_t reserved2[3]; | 45 | uint8_t reserved2[3]; |
46 | uint8_t volume_serial[8]; | 46 | uint8_t volume_serial[8]; |
47 | uint16_t checksum; | 47 | uint16_t checksum; |
48 | } __attribute__((__packed__)); | 48 | } PACKED; |
49 | 49 | ||
50 | struct master_file_table_record { | 50 | struct master_file_table_record { |
51 | uint8_t magic[4]; | 51 | uint8_t magic[4]; |
@@ -58,7 +58,7 @@ struct master_file_table_record { | |||
58 | uint16_t flags; | 58 | uint16_t flags; |
59 | uint32_t bytes_in_use; | 59 | uint32_t bytes_in_use; |
60 | uint32_t bytes_allocated; | 60 | uint32_t bytes_allocated; |
61 | } __attribute__((__packed__)); | 61 | } PACKED; |
62 | 62 | ||
63 | struct file_attribute { | 63 | struct file_attribute { |
64 | uint32_t type; | 64 | uint32_t type; |
@@ -70,13 +70,13 @@ struct file_attribute { | |||
70 | uint16_t instance; | 70 | uint16_t instance; |
71 | uint32_t value_len; | 71 | uint32_t value_len; |
72 | uint16_t value_offset; | 72 | uint16_t value_offset; |
73 | } __attribute__((__packed__)); | 73 | } PACKED; |
74 | 74 | ||
75 | struct volume_info { | 75 | struct volume_info { |
76 | uint64_t reserved; | 76 | uint64_t reserved; |
77 | uint8_t major_ver; | 77 | uint8_t major_ver; |
78 | uint8_t minor_ver; | 78 | uint8_t minor_ver; |
79 | } __attribute__((__packed__)); | 79 | } PACKED; |
80 | 80 | ||
81 | #define MFT_RECORD_VOLUME 3 | 81 | #define MFT_RECORD_VOLUME 3 |
82 | #define MFT_RECORD_ATTR_VOLUME_NAME 0x60 | 82 | #define MFT_RECORD_ATTR_VOLUME_NAME 0x60 |
diff --git a/util-linux/volume_id/ocfs2.c b/util-linux/volume_id/ocfs2.c index 8417d91bb..14573caa1 100644 --- a/util-linux/volume_id/ocfs2.c +++ b/util-linux/volume_id/ocfs2.c | |||
@@ -78,7 +78,7 @@ struct ocfs2_super_block { | |||
78 | uint64_t s_first_cluster_group; /* Block offset of 1st cluster group header */ | 78 | uint64_t s_first_cluster_group; /* Block offset of 1st cluster group header */ |
79 | uint8_t s_label[OCFS2_MAX_VOL_LABEL_LEN]; /* Label for mounting, etc. */ | 79 | uint8_t s_label[OCFS2_MAX_VOL_LABEL_LEN]; /* Label for mounting, etc. */ |
80 | uint8_t s_uuid[OCFS2_VOL_UUID_LEN]; /* 128-bit uuid */ | 80 | uint8_t s_uuid[OCFS2_VOL_UUID_LEN]; /* 128-bit uuid */ |
81 | } __attribute__((__packed__)); | 81 | } PACKED; |
82 | 82 | ||
83 | int volume_id_probe_ocfs2(struct volume_id *id /*,uint64_t off*/) | 83 | int volume_id_probe_ocfs2(struct volume_id *id /*,uint64_t off*/) |
84 | { | 84 | { |
diff --git a/util-linux/volume_id/reiserfs.c b/util-linux/volume_id/reiserfs.c index b8cdc9809..1298f86ae 100644 --- a/util-linux/volume_id/reiserfs.c +++ b/util-linux/volume_id/reiserfs.c | |||
@@ -35,7 +35,7 @@ struct reiserfs_super_block { | |||
35 | uint32_t dummy4[5]; | 35 | uint32_t dummy4[5]; |
36 | uint8_t uuid[16]; | 36 | uint8_t uuid[16]; |
37 | uint8_t label[16]; | 37 | uint8_t label[16]; |
38 | } __attribute__((__packed__)); | 38 | } PACKED; |
39 | 39 | ||
40 | struct reiser4_super_block { | 40 | struct reiser4_super_block { |
41 | uint8_t magic[16]; | 41 | uint8_t magic[16]; |
@@ -43,7 +43,7 @@ struct reiser4_super_block { | |||
43 | uint8_t uuid[16]; | 43 | uint8_t uuid[16]; |
44 | uint8_t label[16]; | 44 | uint8_t label[16]; |
45 | uint64_t dummy2; | 45 | uint64_t dummy2; |
46 | } __attribute__((__packed__)); | 46 | } PACKED; |
47 | 47 | ||
48 | #define REISERFS1_SUPERBLOCK_OFFSET 0x2000 | 48 | #define REISERFS1_SUPERBLOCK_OFFSET 0x2000 |
49 | #define REISERFS_SUPERBLOCK_OFFSET 0x10000 | 49 | #define REISERFS_SUPERBLOCK_OFFSET 0x10000 |
diff --git a/util-linux/volume_id/romfs.c b/util-linux/volume_id/romfs.c index 2c061bdfc..4ed13191e 100644 --- a/util-linux/volume_id/romfs.c +++ b/util-linux/volume_id/romfs.c | |||
@@ -25,7 +25,7 @@ struct romfs_super { | |||
25 | uint32_t size; | 25 | uint32_t size; |
26 | uint32_t checksum; | 26 | uint32_t checksum; |
27 | uint8_t name[0]; | 27 | uint8_t name[0]; |
28 | } __attribute__((__packed__)); | 28 | } PACKED; |
29 | 29 | ||
30 | int volume_id_probe_romfs(struct volume_id *id /*,uint64_t off*/) | 30 | int volume_id_probe_romfs(struct volume_id *id /*,uint64_t off*/) |
31 | { | 31 | { |
diff --git a/util-linux/volume_id/sysv.c b/util-linux/volume_id/sysv.c index 7a99cd6c7..0e6507291 100644 --- a/util-linux/volume_id/sysv.c +++ b/util-linux/volume_id/sysv.c | |||
@@ -48,7 +48,7 @@ struct sysv_super { | |||
48 | uint32_t s_state; | 48 | uint32_t s_state; |
49 | uint32_t s_magic; | 49 | uint32_t s_magic; |
50 | uint32_t s_type; | 50 | uint32_t s_type; |
51 | } __attribute__((__packed__)); | 51 | } PACKED; |
52 | 52 | ||
53 | #define XENIX_NICINOD 100 | 53 | #define XENIX_NICINOD 100 |
54 | #define XENIX_NICFREE 100 | 54 | #define XENIX_NICFREE 100 |
@@ -74,7 +74,7 @@ struct xenix_super { | |||
74 | uint8_t s_fill[371]; | 74 | uint8_t s_fill[371]; |
75 | uint32_t s_magic; | 75 | uint32_t s_magic; |
76 | uint32_t s_type; | 76 | uint32_t s_type; |
77 | } __attribute__((__packed__)); | 77 | } PACKED; |
78 | 78 | ||
79 | #define SYSV_SUPERBLOCK_BLOCK 0x01 | 79 | #define SYSV_SUPERBLOCK_BLOCK 0x01 |
80 | #define SYSV_MAGIC 0xfd187e20 | 80 | #define SYSV_MAGIC 0xfd187e20 |
diff --git a/util-linux/volume_id/udf.c b/util-linux/volume_id/udf.c index e272e1923..a6e719a3c 100644 --- a/util-linux/volume_id/udf.c +++ b/util-linux/volume_id/udf.c | |||
@@ -30,28 +30,28 @@ struct volume_descriptor { | |||
30 | uint16_t crc; | 30 | uint16_t crc; |
31 | uint16_t crc_len; | 31 | uint16_t crc_len; |
32 | uint32_t location; | 32 | uint32_t location; |
33 | } __attribute__((__packed__)) tag; | 33 | } PACKED tag; |
34 | union { | 34 | union { |
35 | struct anchor_descriptor { | 35 | struct anchor_descriptor { |
36 | uint32_t length; | 36 | uint32_t length; |
37 | uint32_t location; | 37 | uint32_t location; |
38 | } __attribute__((__packed__)) anchor; | 38 | } PACKED anchor; |
39 | struct primary_descriptor { | 39 | struct primary_descriptor { |
40 | uint32_t seq_num; | 40 | uint32_t seq_num; |
41 | uint32_t desc_num; | 41 | uint32_t desc_num; |
42 | struct dstring { | 42 | struct dstring { |
43 | uint8_t clen; | 43 | uint8_t clen; |
44 | uint8_t c[31]; | 44 | uint8_t c[31]; |
45 | } __attribute__((__packed__)) ident; | 45 | } PACKED ident; |
46 | } __attribute__((__packed__)) primary; | 46 | } PACKED primary; |
47 | } __attribute__((__packed__)) type; | 47 | } PACKED type; |
48 | } __attribute__((__packed__)); | 48 | } PACKED; |
49 | 49 | ||
50 | struct volume_structure_descriptor { | 50 | struct volume_structure_descriptor { |
51 | uint8_t type; | 51 | uint8_t type; |
52 | uint8_t id[5]; | 52 | uint8_t id[5]; |
53 | uint8_t version; | 53 | uint8_t version; |
54 | } __attribute__((__packed__)); | 54 | } PACKED; |
55 | 55 | ||
56 | #define UDF_VSD_OFFSET 0x8000 | 56 | #define UDF_VSD_OFFSET 0x8000 |
57 | 57 | ||
diff --git a/util-linux/volume_id/unused_highpoint.c b/util-linux/volume_id/unused_highpoint.c index 57c5cadc4..6fd58b787 100644 --- a/util-linux/volume_id/unused_highpoint.c +++ b/util-linux/volume_id/unused_highpoint.c | |||
@@ -23,11 +23,11 @@ | |||
23 | struct hpt37x_meta { | 23 | struct hpt37x_meta { |
24 | uint8_t filler1[32]; | 24 | uint8_t filler1[32]; |
25 | uint32_t magic; | 25 | uint32_t magic; |
26 | } __attribute__((packed)); | 26 | } PACKED; |
27 | 27 | ||
28 | struct hpt45x_meta { | 28 | struct hpt45x_meta { |
29 | uint32_t magic; | 29 | uint32_t magic; |
30 | } __attribute__((packed)); | 30 | } PACKED; |
31 | 31 | ||
32 | #define HPT37X_CONFIG_OFF 0x1200 | 32 | #define HPT37X_CONFIG_OFF 0x1200 |
33 | #define HPT37X_MAGIC_OK 0x5a7816f0 | 33 | #define HPT37X_MAGIC_OK 0x5a7816f0 |
diff --git a/util-linux/volume_id/unused_hpfs.c b/util-linux/volume_id/unused_hpfs.c index 9d5244f57..8c7897a77 100644 --- a/util-linux/volume_id/unused_hpfs.c +++ b/util-linux/volume_id/unused_hpfs.c | |||
@@ -23,7 +23,7 @@ | |||
23 | struct hpfs_super { | 23 | struct hpfs_super { |
24 | uint8_t magic[4]; | 24 | uint8_t magic[4]; |
25 | uint8_t version; | 25 | uint8_t version; |
26 | } __attribute__((__packed__)); | 26 | } PACKED; |
27 | 27 | ||
28 | #define HPFS_SUPERBLOCK_OFFSET 0x2000 | 28 | #define HPFS_SUPERBLOCK_OFFSET 0x2000 |
29 | 29 | ||
diff --git a/util-linux/volume_id/unused_isw_raid.c b/util-linux/volume_id/unused_isw_raid.c index d928245fb..b31a124a2 100644 --- a/util-linux/volume_id/unused_isw_raid.c +++ b/util-linux/volume_id/unused_isw_raid.c | |||
@@ -26,7 +26,7 @@ struct isw_meta { | |||
26 | uint32_t mpb_size; | 26 | uint32_t mpb_size; |
27 | uint32_t family_num; | 27 | uint32_t family_num; |
28 | uint32_t generation_num; | 28 | uint32_t generation_num; |
29 | } __attribute__((packed)); | 29 | } PACKED; |
30 | 30 | ||
31 | #define ISW_SIGNATURE "Intel Raid ISM Cfg Sig. " | 31 | #define ISW_SIGNATURE "Intel Raid ISM Cfg Sig. " |
32 | 32 | ||
diff --git a/util-linux/volume_id/unused_lsi_raid.c b/util-linux/volume_id/unused_lsi_raid.c index 730a3134e..6899900db 100644 --- a/util-linux/volume_id/unused_lsi_raid.c +++ b/util-linux/volume_id/unused_lsi_raid.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | struct lsi_meta { | 23 | struct lsi_meta { |
24 | uint8_t sig[6]; | 24 | uint8_t sig[6]; |
25 | } __attribute__((packed)); | 25 | } PACKED; |
26 | 26 | ||
27 | #define LSI_SIGNATURE "$XIDE$" | 27 | #define LSI_SIGNATURE "$XIDE$" |
28 | 28 | ||
diff --git a/util-linux/volume_id/unused_lvm.c b/util-linux/volume_id/unused_lvm.c index caee04ba5..c3270681e 100644 --- a/util-linux/volume_id/unused_lvm.c +++ b/util-linux/volume_id/unused_lvm.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | struct lvm1_super_block { | 23 | struct lvm1_super_block { |
24 | uint8_t id[2]; | 24 | uint8_t id[2]; |
25 | } __attribute__((packed)); | 25 | } PACKED; |
26 | 26 | ||
27 | struct lvm2_super_block { | 27 | struct lvm2_super_block { |
28 | uint8_t id[8]; | 28 | uint8_t id[8]; |
@@ -30,7 +30,7 @@ struct lvm2_super_block { | |||
30 | uint32_t crc_xl; | 30 | uint32_t crc_xl; |
31 | uint32_t offset_xl; | 31 | uint32_t offset_xl; |
32 | uint8_t type[8]; | 32 | uint8_t type[8]; |
33 | } __attribute__((packed)); | 33 | } PACKED; |
34 | 34 | ||
35 | #define LVM1_SB_OFF 0x400 | 35 | #define LVM1_SB_OFF 0x400 |
36 | 36 | ||
diff --git a/util-linux/volume_id/unused_mac.c b/util-linux/volume_id/unused_mac.c index 8eaa17344..c4732ee0d 100644 --- a/util-linux/volume_id/unused_mac.c +++ b/util-linux/volume_id/unused_mac.c | |||
@@ -24,7 +24,7 @@ struct mac_driver_desc { | |||
24 | uint8_t signature[2]; | 24 | uint8_t signature[2]; |
25 | uint16_t block_size; | 25 | uint16_t block_size; |
26 | uint32_t block_count; | 26 | uint32_t block_count; |
27 | } __attribute__((__packed__)); | 27 | } PACKED; |
28 | 28 | ||
29 | struct mac_partition { | 29 | struct mac_partition { |
30 | uint8_t signature[2]; | 30 | uint8_t signature[2]; |
@@ -34,7 +34,7 @@ struct mac_partition { | |||
34 | uint32_t block_count; | 34 | uint32_t block_count; |
35 | uint8_t name[32]; | 35 | uint8_t name[32]; |
36 | uint8_t type[32]; | 36 | uint8_t type[32]; |
37 | } __attribute__((__packed__)); | 37 | } PACKED; |
38 | 38 | ||
39 | int volume_id_probe_mac_partition_map(struct volume_id *id, uint64_t off) | 39 | int volume_id_probe_mac_partition_map(struct volume_id *id, uint64_t off) |
40 | { | 40 | { |
diff --git a/util-linux/volume_id/unused_minix.c b/util-linux/volume_id/unused_minix.c index 2f5209333..4f4f8a720 100644 --- a/util-linux/volume_id/unused_minix.c +++ b/util-linux/volume_id/unused_minix.c | |||
@@ -31,7 +31,7 @@ struct minix_super_block { | |||
31 | uint16_t s_magic; | 31 | uint16_t s_magic; |
32 | uint16_t s_state; | 32 | uint16_t s_state; |
33 | uint32_t s_zones; | 33 | uint32_t s_zones; |
34 | } __attribute__((__packed__)); | 34 | } PACKED; |
35 | 35 | ||
36 | #define MINIX_SUPERBLOCK_OFFSET 0x400 | 36 | #define MINIX_SUPERBLOCK_OFFSET 0x400 |
37 | 37 | ||
diff --git a/util-linux/volume_id/unused_msdos.c b/util-linux/volume_id/unused_msdos.c index 097ee6728..465f22dc3 100644 --- a/util-linux/volume_id/unused_msdos.c +++ b/util-linux/volume_id/unused_msdos.c | |||
@@ -31,7 +31,7 @@ struct msdos_partition_entry { | |||
31 | uint8_t end_cyl; | 31 | uint8_t end_cyl; |
32 | uint32_t start_sect; | 32 | uint32_t start_sect; |
33 | uint32_t nr_sects; | 33 | uint32_t nr_sects; |
34 | } __attribute__((packed)); | 34 | } PACKED; |
35 | 35 | ||
36 | #define MSDOS_PARTTABLE_OFFSET 0x1be | 36 | #define MSDOS_PARTTABLE_OFFSET 0x1be |
37 | #define MSDOS_SIG_OFF 0x1fe | 37 | #define MSDOS_SIG_OFF 0x1fe |
diff --git a/util-linux/volume_id/unused_nvidia_raid.c b/util-linux/volume_id/unused_nvidia_raid.c index 692aad111..b65cec41d 100644 --- a/util-linux/volume_id/unused_nvidia_raid.c +++ b/util-linux/volume_id/unused_nvidia_raid.c | |||
@@ -25,7 +25,7 @@ struct nvidia_meta { | |||
25 | uint32_t size; | 25 | uint32_t size; |
26 | uint32_t chksum; | 26 | uint32_t chksum; |
27 | uint16_t version; | 27 | uint16_t version; |
28 | } __attribute__((packed)); | 28 | } PACKED; |
29 | 29 | ||
30 | #define NVIDIA_SIGNATURE "NVIDIA" | 30 | #define NVIDIA_SIGNATURE "NVIDIA" |
31 | 31 | ||
diff --git a/util-linux/volume_id/unused_promise_raid.c b/util-linux/volume_id/unused_promise_raid.c index 75c6f89d4..4a15ddaf1 100644 --- a/util-linux/volume_id/unused_promise_raid.c +++ b/util-linux/volume_id/unused_promise_raid.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | struct promise_meta { | 23 | struct promise_meta { |
24 | uint8_t sig[24]; | 24 | uint8_t sig[24]; |
25 | } __attribute__((packed)); | 25 | } PACKED; |
26 | 26 | ||
27 | #define PDC_CONFIG_OFF 0x1200 | 27 | #define PDC_CONFIG_OFF 0x1200 |
28 | #define PDC_SIGNATURE "Promise Technology, Inc." | 28 | #define PDC_SIGNATURE "Promise Technology, Inc." |
diff --git a/util-linux/volume_id/unused_silicon_raid.c b/util-linux/volume_id/unused_silicon_raid.c index 51431124b..6ce4037c6 100644 --- a/util-linux/volume_id/unused_silicon_raid.c +++ b/util-linux/volume_id/unused_silicon_raid.c | |||
@@ -37,7 +37,7 @@ struct silicon_meta { | |||
37 | uint16_t vendor_id; | 37 | uint16_t vendor_id; |
38 | uint16_t minor_ver; | 38 | uint16_t minor_ver; |
39 | uint16_t major_ver; | 39 | uint16_t major_ver; |
40 | } __attribute__((packed)); | 40 | } PACKED; |
41 | 41 | ||
42 | #define SILICON_MAGIC 0x2F000000 | 42 | #define SILICON_MAGIC 0x2F000000 |
43 | 43 | ||
diff --git a/util-linux/volume_id/unused_ufs.c b/util-linux/volume_id/unused_ufs.c index 86937585f..e05e93380 100644 --- a/util-linux/volume_id/unused_ufs.c +++ b/util-linux/volume_id/unused_ufs.c | |||
@@ -73,7 +73,7 @@ struct ufs_super_block { | |||
73 | uint32_t cs_nbfree; | 73 | uint32_t cs_nbfree; |
74 | uint32_t cs_nifree; | 74 | uint32_t cs_nifree; |
75 | uint32_t cs_nffree; | 75 | uint32_t cs_nffree; |
76 | } __attribute__((__packed__)) fs_cstotal; | 76 | } PACKED fs_cstotal; |
77 | int8_t fs_fmod; | 77 | int8_t fs_fmod; |
78 | int8_t fs_clean; | 78 | int8_t fs_clean; |
79 | int8_t fs_ronly; | 79 | int8_t fs_ronly; |
@@ -86,7 +86,7 @@ struct ufs_super_block { | |||
86 | uint32_t fs_maxcluster; | 86 | uint32_t fs_maxcluster; |
87 | uint32_t fs_cpc; | 87 | uint32_t fs_cpc; |
88 | uint16_t fs_opostbl[16][8]; | 88 | uint16_t fs_opostbl[16][8]; |
89 | } __attribute__((__packed__)) fs_u1; | 89 | } PACKED fs_u1; |
90 | struct { | 90 | struct { |
91 | int8_t fs_fsmnt[468]; | 91 | int8_t fs_fsmnt[468]; |
92 | uint8_t fs_volname[32]; | 92 | uint8_t fs_volname[32]; |
@@ -109,17 +109,17 @@ struct ufs_super_block { | |||
109 | uint64_t cs_nffree; | 109 | uint64_t cs_nffree; |
110 | uint64_t cs_numclusters; | 110 | uint64_t cs_numclusters; |
111 | uint64_t cs_spare[3]; | 111 | uint64_t cs_spare[3]; |
112 | } __attribute__((__packed__)) fs_cstotal; | 112 | } PACKED fs_cstotal; |
113 | struct ufs_timeval { | 113 | struct ufs_timeval { |
114 | int32_t tv_sec; | 114 | int32_t tv_sec; |
115 | int32_t tv_usec; | 115 | int32_t tv_usec; |
116 | } __attribute__((__packed__)) fs_time; | 116 | } PACKED fs_time; |
117 | int64_t fs_size; | 117 | int64_t fs_size; |
118 | int64_t fs_dsize; | 118 | int64_t fs_dsize; |
119 | uint64_t fs_csaddr; | 119 | uint64_t fs_csaddr; |
120 | int64_t fs_pendingblocks; | 120 | int64_t fs_pendingblocks; |
121 | int32_t fs_pendinginodes; | 121 | int32_t fs_pendinginodes; |
122 | } __attribute__((__packed__)) fs_u2; | 122 | } PACKED fs_u2; |
123 | } fs_u11; | 123 | } fs_u11; |
124 | union { | 124 | union { |
125 | struct { | 125 | struct { |
@@ -129,7 +129,7 @@ struct ufs_super_block { | |||
129 | int32_t fs_state; | 129 | int32_t fs_state; |
130 | uint32_t fs_qbmask[2]; | 130 | uint32_t fs_qbmask[2]; |
131 | uint32_t fs_qfmask[2]; | 131 | uint32_t fs_qfmask[2]; |
132 | } __attribute__((__packed__)) fs_sun; | 132 | } PACKED fs_sun; |
133 | struct { | 133 | struct { |
134 | int32_t fs_sparecon[53]; | 134 | int32_t fs_sparecon[53]; |
135 | int32_t fs_reclaim; | 135 | int32_t fs_reclaim; |
@@ -137,7 +137,7 @@ struct ufs_super_block { | |||
137 | uint32_t fs_npsect; | 137 | uint32_t fs_npsect; |
138 | uint32_t fs_qbmask[2]; | 138 | uint32_t fs_qbmask[2]; |
139 | uint32_t fs_qfmask[2]; | 139 | uint32_t fs_qfmask[2]; |
140 | } __attribute__((__packed__)) fs_sunx86; | 140 | } PACKED fs_sunx86; |
141 | struct { | 141 | struct { |
142 | int32_t fs_sparecon[50]; | 142 | int32_t fs_sparecon[50]; |
143 | int32_t fs_contigsumsize; | 143 | int32_t fs_contigsumsize; |
@@ -147,7 +147,7 @@ struct ufs_super_block { | |||
147 | uint32_t fs_qbmask[2]; | 147 | uint32_t fs_qbmask[2]; |
148 | uint32_t fs_qfmask[2]; | 148 | uint32_t fs_qfmask[2]; |
149 | int32_t fs_state; | 149 | int32_t fs_state; |
150 | } __attribute__((__packed__)) fs_44; | 150 | } PACKED fs_44; |
151 | } fs_u2; | 151 | } fs_u2; |
152 | int32_t fs_postblformat; | 152 | int32_t fs_postblformat; |
153 | int32_t fs_nrpos; | 153 | int32_t fs_nrpos; |
@@ -155,7 +155,7 @@ struct ufs_super_block { | |||
155 | int32_t fs_rotbloff; | 155 | int32_t fs_rotbloff; |
156 | uint32_t fs_magic; | 156 | uint32_t fs_magic; |
157 | uint8_t fs_space[1]; | 157 | uint8_t fs_space[1]; |
158 | } __attribute__((__packed__)); | 158 | } PACKED; |
159 | 159 | ||
160 | #define UFS_MAGIC 0x00011954 | 160 | #define UFS_MAGIC 0x00011954 |
161 | #define UFS2_MAGIC 0x19540119 | 161 | #define UFS2_MAGIC 0x19540119 |
diff --git a/util-linux/volume_id/unused_via_raid.c b/util-linux/volume_id/unused_via_raid.c index 433294699..21ed315ba 100644 --- a/util-linux/volume_id/unused_via_raid.c +++ b/util-linux/volume_id/unused_via_raid.c | |||
@@ -29,10 +29,10 @@ struct via_meta { | |||
29 | uint32_t capacity_low; | 29 | uint32_t capacity_low; |
30 | uint32_t capacity_high; | 30 | uint32_t capacity_high; |
31 | uint32_t serial_checksum; | 31 | uint32_t serial_checksum; |
32 | } __attribute((packed)) array; | 32 | } PACKED array; |
33 | uint32_t serial_checksum[8]; | 33 | uint32_t serial_checksum[8]; |
34 | uint8_t checksum; | 34 | uint8_t checksum; |
35 | } __attribute__((packed)); | 35 | } PACKED; |
36 | 36 | ||
37 | #define VIA_SIGNATURE 0xAA55 | 37 | #define VIA_SIGNATURE 0xAA55 |
38 | 38 | ||
diff --git a/util-linux/volume_id/xfs.c b/util-linux/volume_id/xfs.c index 646c81d3b..389074c35 100644 --- a/util-linux/volume_id/xfs.c +++ b/util-linux/volume_id/xfs.c | |||
@@ -33,7 +33,7 @@ struct xfs_super_block { | |||
33 | uint64_t icount; | 33 | uint64_t icount; |
34 | uint64_t ifree; | 34 | uint64_t ifree; |
35 | uint64_t fdblocks; | 35 | uint64_t fdblocks; |
36 | } __attribute__((__packed__)); | 36 | } PACKED; |
37 | 37 | ||
38 | int volume_id_probe_xfs(struct volume_id *id /*,uint64_t off*/) | 38 | int volume_id_probe_xfs(struct volume_id *id /*,uint64_t off*/) |
39 | { | 39 | { |