svn commit: trunk/busybox/util-linux
vda at busybox.net
vda at busybox.net
Sun Mar 18 14:43:21 UTC 2007
Author: vda
Date: 2007-03-18 07:43:21 -0700 (Sun, 18 Mar 2007)
New Revision: 18137
Log:
mkfs_minix: remove older, less efficient bss reduction trick
Modified:
trunk/busybox/util-linux/mkfs_minix.c
Changeset:
Modified: trunk/busybox/util-linux/mkfs_minix.c
===================================================================
--- trunk/busybox/util-linux/mkfs_minix.c 2007-03-18 14:42:45 UTC (rev 18136)
+++ trunk/busybox/util-linux/mkfs_minix.c 2007-03-18 14:43:21 UTC (rev 18137)
@@ -115,6 +115,8 @@
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 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 @@
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 @@
G.currently_testing++;
}
alarm(0);
- free(buffer);
printf("%d bad block(s)\n", G.badblocks);
}
More information about the busybox-cvs
mailing list