diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-18 17:43:21 +0300 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-18 17:43:21 +0300 |
commit | 83bb98f7597c4871e46abf48c36c8f57a528d11f (patch) | |
tree | 7d0a08a4c370abf7c333e16d0d8b76074f2a7658 /util-linux | |
parent | 8e1a0cc4c9ff49938d0d29168a2c51103155a65b (diff) |
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 { char super_block_buffer[BLOCK_SIZE]; char boot_block_buffer[512]; unsigned short good_blocks_table[MAX_GOOD_BLOCKS]; + /* check_blocks(): buffer[] was the biggest static in entire bbox */ + char check_blocks_buffer[BLOCK_SIZE * TEST_BUFFER_BLOCKS]; }; #define G (*ptr_to_globals) @@ -492,8 +494,6 @@ static void alarm_intr(int alnum) static void check_blocks(void) { size_t try, got; - /* buffer[] was the biggest static in entire bbox */ - char *buffer = xmalloc(BLOCK_SIZE * TEST_BUFFER_BLOCKS); G.currently_testing = 0; signal(SIGALRM, alarm_intr); @@ -505,7 +505,7 @@ static void check_blocks(void) try = TEST_BUFFER_BLOCKS; if (G.currently_testing + try > SB_ZONES) try = SB_ZONES - G.currently_testing; - got = do_check(buffer, try, G.currently_testing); + got = do_check(G.check_blocks_buffer, try, G.currently_testing); G.currently_testing += got; if (got == try) continue; @@ -516,7 +516,6 @@ static void check_blocks(void) G.currently_testing++; } alarm(0); - free(buffer); printf("%d bad block(s)\n", G.badblocks); } |