diff options
Diffstat (limited to 'util-linux/fsck_minix.c')
-rw-r--r-- | util-linux/fsck_minix.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index 8c2b7d8de..c4612f251 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c | |||
@@ -173,7 +173,10 @@ struct globals { | |||
173 | 173 | ||
174 | /* Bigger stuff */ | 174 | /* Bigger stuff */ |
175 | struct termios sv_termios; | 175 | struct termios sv_termios; |
176 | char superblock_buffer[BLOCK_SIZE]; | 176 | union { |
177 | char superblock_buffer[BLOCK_SIZE]; | ||
178 | struct minix_superblock Super; | ||
179 | } u; | ||
177 | char add_zone_ind_blk[BLOCK_SIZE]; | 180 | char add_zone_ind_blk[BLOCK_SIZE]; |
178 | char add_zone_dind_blk[BLOCK_SIZE]; | 181 | char add_zone_dind_blk[BLOCK_SIZE]; |
179 | IF_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];) | 182 | IF_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];) |
@@ -207,7 +210,7 @@ struct globals { | |||
207 | #define name_depth (G.name_depth ) | 210 | #define name_depth (G.name_depth ) |
208 | #define name_component (G.name_component ) | 211 | #define name_component (G.name_component ) |
209 | #define sv_termios (G.sv_termios ) | 212 | #define sv_termios (G.sv_termios ) |
210 | #define superblock_buffer (G.superblock_buffer ) | 213 | #define superblock_buffer (G.u.superblock_buffer) |
211 | #define add_zone_ind_blk (G.add_zone_ind_blk ) | 214 | #define add_zone_ind_blk (G.add_zone_ind_blk ) |
212 | #define add_zone_dind_blk (G.add_zone_dind_blk ) | 215 | #define add_zone_dind_blk (G.add_zone_dind_blk ) |
213 | #define add_zone_tind_blk (G.add_zone_tind_blk ) | 216 | #define add_zone_tind_blk (G.add_zone_tind_blk ) |
@@ -247,7 +250,7 @@ enum { | |||
247 | #define Inode1 (((struct minix1_inode *) inode_buffer)-1) | 250 | #define Inode1 (((struct minix1_inode *) inode_buffer)-1) |
248 | #define Inode2 (((struct minix2_inode *) inode_buffer)-1) | 251 | #define Inode2 (((struct minix2_inode *) inode_buffer)-1) |
249 | 252 | ||
250 | #define Super (*(struct minix_superblock *)(superblock_buffer)) | 253 | #define Super (G.u.Super) |
251 | 254 | ||
252 | #if ENABLE_FEATURE_MINIX2 | 255 | #if ENABLE_FEATURE_MINIX2 |
253 | # define ZONES ((unsigned)(version2 ? Super.s_zones : Super.s_nzones)) | 256 | # define ZONES ((unsigned)(version2 ? Super.s_zones : Super.s_nzones)) |
@@ -1232,8 +1235,7 @@ int fsck_minix_main(int argc UNUSED_PARAM, char **argv) | |||
1232 | 1235 | ||
1233 | INIT_G(); | 1236 | INIT_G(); |
1234 | 1237 | ||
1235 | opt_complementary = "=1:ar"; /* one argument; -a assumes -r */ | 1238 | getopt32(argv, "^" OPTION_STR "\0" "=1:ar" /* one arg; -a assumes -r */); |
1236 | getopt32(argv, OPTION_STR); | ||
1237 | argv += optind; | 1239 | argv += optind; |
1238 | device_name = argv[0]; | 1240 | device_name = argv[0]; |
1239 | 1241 | ||