diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-08-28 00:43:07 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-08-28 00:43:07 +0000 |
commit | b225e2a76bcd2b1f3f919a09dba1e186c0d4fa65 (patch) | |
tree | cb40909520a92fd5c133d831a4d34865a15ae6f0 /util-linux/mkfs_minix.c | |
parent | 785001468dffa2d532b6efa5603622dd85d2bc74 (diff) | |
download | busybox-w32-b225e2a76bcd2b1f3f919a09dba1e186c0d4fa65.tar.gz busybox-w32-b225e2a76bcd2b1f3f919a09dba1e186c0d4fa65.tar.bz2 busybox-w32-b225e2a76bcd2b1f3f919a09dba1e186c0d4fa65.zip |
Fixup some warnings
Diffstat (limited to 'util-linux/mkfs_minix.c')
-rw-r--r-- | util-linux/mkfs_minix.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index ffdc0b8c0..264569a94 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c | |||
@@ -194,7 +194,7 @@ struct minix_dir_entry { | |||
194 | 194 | ||
195 | static char *device_name = NULL; | 195 | static char *device_name = NULL; |
196 | static int DEV = -1; | 196 | static int DEV = -1; |
197 | static long BLOCKS = 0; | 197 | static uint32_t BLOCKS = 0; |
198 | static int check = 0; | 198 | static int check = 0; |
199 | static int badblocks = 0; | 199 | static int badblocks = 0; |
200 | static int namelen = 30; /* default (changed to 30, per Linus's | 200 | static int namelen = 30; /* default (changed to 30, per Linus's |
@@ -216,17 +216,17 @@ static char super_block_buffer[BLOCK_SIZE]; | |||
216 | static char boot_block_buffer[512]; | 216 | static char boot_block_buffer[512]; |
217 | 217 | ||
218 | #define Super (*(struct minix_super_block *)super_block_buffer) | 218 | #define Super (*(struct minix_super_block *)super_block_buffer) |
219 | #define INODES ((unsigned long)Super.s_ninodes) | 219 | #define INODES (Super.s_ninodes) |
220 | #ifdef CONFIG_FEATURE_MINIX2 | 220 | #ifdef CONFIG_FEATURE_MINIX2 |
221 | #define ZONES ((unsigned long)(version2 ? Super.s_zones : Super.s_nzones)) | 221 | #define ZONES (version2 ? Super.s_zones : Super.s_nzones) |
222 | #else | 222 | #else |
223 | #define ZONES ((unsigned long)(Super.s_nzones)) | 223 | #define ZONES (Super.s_nzones) |
224 | #endif | 224 | #endif |
225 | #define IMAPS ((unsigned long)Super.s_imap_blocks) | 225 | #define IMAPS (Super.s_imap_blocks) |
226 | #define ZMAPS ((unsigned long)Super.s_zmap_blocks) | 226 | #define ZMAPS (Super.s_zmap_blocks) |
227 | #define FIRSTZONE ((unsigned long)Super.s_firstdatazone) | 227 | #define FIRSTZONE (Super.s_firstdatazone) |
228 | #define ZONESIZE ((unsigned long)Super.s_log_zone_size) | 228 | #define ZONESIZE (Super.s_log_zone_size) |
229 | #define MAXSIZE ((unsigned long)Super.s_max_size) | 229 | #define MAXSIZE (Super.s_max_size) |
230 | #define MAGIC (Super.s_magic) | 230 | #define MAGIC (Super.s_magic) |
231 | #define NORM_FIRSTZONE (2+IMAPS+ZMAPS+INODE_BLOCKS) | 231 | #define NORM_FIRSTZONE (2+IMAPS+ZMAPS+INODE_BLOCKS) |
232 | 232 | ||
@@ -544,7 +544,13 @@ static inline void setup_tables(void) | |||
544 | MAGIC = magic; | 544 | MAGIC = magic; |
545 | ZONESIZE = 0; | 545 | ZONESIZE = 0; |
546 | MAXSIZE = version2 ? 0x7fffffff : (7 + 512 + 512 * 512) * 1024; | 546 | MAXSIZE = version2 ? 0x7fffffff : (7 + 512 + 512 * 512) * 1024; |
547 | ZONES = BLOCKS; | 547 | #ifdef CONFIG_FEATURE_MINIX2 |
548 | if (version2) { | ||
549 | Super.s_zones = BLOCKS; | ||
550 | } else | ||
551 | #endif | ||
552 | Super.s_nzones = BLOCKS; | ||
553 | |||
548 | /* some magic nrs: 1 inode / 3 blocks */ | 554 | /* some magic nrs: 1 inode / 3 blocks */ |
549 | if (req_nr_inodes == 0) | 555 | if (req_nr_inodes == 0) |
550 | inodes = BLOCKS / 3; | 556 | inodes = BLOCKS / 3; |
@@ -593,11 +599,11 @@ static inline void setup_tables(void) | |||
593 | unmark_inode(i); | 599 | unmark_inode(i); |
594 | inode_buffer = xmalloc(INODE_BUFFER_SIZE); | 600 | inode_buffer = xmalloc(INODE_BUFFER_SIZE); |
595 | memset(inode_buffer, 0, INODE_BUFFER_SIZE); | 601 | memset(inode_buffer, 0, INODE_BUFFER_SIZE); |
596 | printf("%ld inodes\n", INODES); | 602 | printf("%ld inodes\n", (long)INODES); |
597 | printf("%ld blocks\n", ZONES); | 603 | printf("%ld blocks\n", (long)ZONES); |
598 | printf("Firstdatazone=%ld (%ld)\n", FIRSTZONE, NORM_FIRSTZONE); | 604 | printf("Firstdatazone=%ld (%ld)\n", (long)FIRSTZONE, (long)NORM_FIRSTZONE); |
599 | printf("Zonesize=%d\n", BLOCK_SIZE << ZONESIZE); | 605 | printf("Zonesize=%d\n", BLOCK_SIZE << ZONESIZE); |
600 | printf("Maxsize=%ld\n\n", MAXSIZE); | 606 | printf("Maxsize=%ld\n\n", (long)MAXSIZE); |
601 | } | 607 | } |
602 | 608 | ||
603 | /* | 609 | /* |