aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-11-30 21:11:01 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-11-30 21:11:01 +0000
commitbe9524961dc319d2905238dcdc7e6c02ae1b0cfd (patch)
tree0b9d8eb5f92194aa86fafe08625752ebb218dca4
parentadb2351deb037c5568c94d759dc2b5dc36ae9a1a (diff)
downloadbusybox-w32-be9524961dc319d2905238dcdc7e6c02ae1b0cfd.tar.gz
busybox-w32-be9524961dc319d2905238dcdc7e6c02ae1b0cfd.tar.bz2
busybox-w32-be9524961dc319d2905238dcdc7e6c02ae1b0cfd.zip
"make bigdata" biggest offender dealt with:
xmalloc 16Kb buffer instead of keeping it in bss git-svn-id: svn://busybox.net/trunk/busybox@16742 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--util-linux/fdisk_osf.c4
-rw-r--r--util-linux/mkfs_minix.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/util-linux/fdisk_osf.c b/util-linux/fdisk_osf.c
index 71cf138ee..bff2371e4 100644
--- a/util-linux/fdisk_osf.c
+++ b/util-linux/fdisk_osf.c
@@ -735,7 +735,7 @@ xbsd_write_bootstrap(void)
735 memset(d, 0, sizeof(struct xbsd_disklabel)); 735 memset(d, 0, sizeof(struct xbsd_disklabel));
736 736
737 snprintf(path, sizeof(path), "%s/boot%s", bootdir, dkbasename); 737 snprintf(path, sizeof(path), "%s/boot%s", bootdir, dkbasename);
738 if (!xbsd_get_bootstrap (path, &disklabelbuffer[xbsd_dlabel.d_secsize], 738 if (!xbsd_get_bootstrap(path, &disklabelbuffer[xbsd_dlabel.d_secsize],
739 (int) xbsd_dlabel.d_bbsize - xbsd_dlabel.d_secsize)) 739 (int) xbsd_dlabel.d_bbsize - xbsd_dlabel.d_secsize))
740 return; 740 return;
741 741
@@ -969,7 +969,7 @@ xbsd_writelabel (struct partition *p, struct xbsd_disklabel *d)
969 d, sizeof(struct xbsd_disklabel)); 969 d, sizeof(struct xbsd_disklabel));
970 970
971#if defined (__alpha__) && BSD_LABELSECTOR == 0 971#if defined (__alpha__) && BSD_LABELSECTOR == 0
972 alpha_bootblock_checksum (disklabelbuffer); 972 alpha_bootblock_checksum(disklabelbuffer);
973 if (lseek(fd, 0, SEEK_SET) == -1) 973 if (lseek(fd, 0, SEEK_SET) == -1)
974 fdisk_fatal(unable_to_seek); 974 fdisk_fatal(unable_to_seek);
975 if (BSD_BBSIZE != write(fd, disklabelbuffer, BSD_BBSIZE)) 975 if (BSD_BBSIZE != write(fd, disklabelbuffer, BSD_BBSIZE))
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index f0b658d0e..af19da68c 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -613,7 +613,8 @@ static void alarm_intr(int alnum)
613static void check_blocks(void) 613static void check_blocks(void)
614{ 614{
615 int try, got; 615 int try, got;
616 static char buffer[BLOCK_SIZE * TEST_BUFFER_BLOCKS]; 616 /* buffer[] was the biggest static in entire bbox */
617 char *buffer = xmalloc(BLOCK_SIZE * TEST_BUFFER_BLOCKS);
617 618
618 currently_testing = 0; 619 currently_testing = 0;
619 signal(SIGALRM, alarm_intr); 620 signal(SIGALRM, alarm_intr);
@@ -635,6 +636,7 @@ static void check_blocks(void)
635 badblocks++; 636 badblocks++;
636 currently_testing++; 637 currently_testing++;
637 } 638 }
639 free(buffer);
638 printf("%d bad block(s)\n", badblocks); 640 printf("%d bad block(s)\n", badblocks);
639} 641}
640 642