diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-18 14:43:21 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-18 14:43:21 +0000 |
| commit | 83bb98f7597c4871e46abf48c36c8f57a528d11f (patch) | |
| tree | 7d0a08a4c370abf7c333e16d0d8b76074f2a7658 /util-linux | |
| parent | 8e1a0cc4c9ff49938d0d29168a2c51103155a65b (diff) | |
| download | busybox-w32-83bb98f7597c4871e46abf48c36c8f57a528d11f.tar.gz busybox-w32-83bb98f7597c4871e46abf48c36c8f57a528d11f.tar.bz2 busybox-w32-83bb98f7597c4871e46abf48c36c8f57a528d11f.zip | |
mkfs_minix: remove older, less efficient bss reduction trick
Diffstat (limited to 'util-linux')
| -rw-r--r-- | util-linux/mkfs_minix.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index 2ba9233df..d70d20fda 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c | |||
| @@ -115,6 +115,8 @@ struct globals { | |||
| 115 | char super_block_buffer[BLOCK_SIZE]; | 115 | char super_block_buffer[BLOCK_SIZE]; |
| 116 | char boot_block_buffer[512]; | 116 | char boot_block_buffer[512]; |
| 117 | unsigned short good_blocks_table[MAX_GOOD_BLOCKS]; | 117 | unsigned short good_blocks_table[MAX_GOOD_BLOCKS]; |
| 118 | /* check_blocks(): buffer[] was the biggest static in entire bbox */ | ||
| 119 | char check_blocks_buffer[BLOCK_SIZE * TEST_BUFFER_BLOCKS]; | ||
| 118 | }; | 120 | }; |
| 119 | 121 | ||
| 120 | #define G (*ptr_to_globals) | 122 | #define G (*ptr_to_globals) |
| @@ -492,8 +494,6 @@ static void alarm_intr(int alnum) | |||
| 492 | static void check_blocks(void) | 494 | static void check_blocks(void) |
| 493 | { | 495 | { |
| 494 | size_t try, got; | 496 | size_t try, got; |
| 495 | /* buffer[] was the biggest static in entire bbox */ | ||
| 496 | char *buffer = xmalloc(BLOCK_SIZE * TEST_BUFFER_BLOCKS); | ||
| 497 | 497 | ||
| 498 | G.currently_testing = 0; | 498 | G.currently_testing = 0; |
| 499 | signal(SIGALRM, alarm_intr); | 499 | signal(SIGALRM, alarm_intr); |
| @@ -505,7 +505,7 @@ static void check_blocks(void) | |||
| 505 | try = TEST_BUFFER_BLOCKS; | 505 | try = TEST_BUFFER_BLOCKS; |
| 506 | if (G.currently_testing + try > SB_ZONES) | 506 | if (G.currently_testing + try > SB_ZONES) |
| 507 | try = SB_ZONES - G.currently_testing; | 507 | try = SB_ZONES - G.currently_testing; |
| 508 | got = do_check(buffer, try, G.currently_testing); | 508 | got = do_check(G.check_blocks_buffer, try, G.currently_testing); |
| 509 | G.currently_testing += got; | 509 | G.currently_testing += got; |
| 510 | if (got == try) | 510 | if (got == try) |
| 511 | continue; | 511 | continue; |
| @@ -516,7 +516,6 @@ static void check_blocks(void) | |||
| 516 | G.currently_testing++; | 516 | G.currently_testing++; |
| 517 | } | 517 | } |
| 518 | alarm(0); | 518 | alarm(0); |
| 519 | free(buffer); | ||
| 520 | printf("%d bad block(s)\n", G.badblocks); | 519 | printf("%d bad block(s)\n", G.badblocks); |
| 521 | } | 520 | } |
| 522 | 521 | ||
