aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-03-17 09:33:45 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-03-17 09:33:45 +0000
commitd0a071a5281f8ba4b291f0c3beb74bee1f8df6a3 (patch)
tree37e443b155eb66fed37e889828fa60023c84010f /util-linux
parentb44c790e41e281965955a83408f35ea53ecdb3d2 (diff)
downloadbusybox-w32-d0a071a5281f8ba4b291f0c3beb74bee1f8df6a3.tar.gz
busybox-w32-d0a071a5281f8ba4b291f0c3beb74bee1f8df6a3.tar.bz2
busybox-w32-d0a071a5281f8ba4b291f0c3beb74bee1f8df6a3.zip
brctl: eliminate stray data object
brctl: use constant fd to reduce parameter passing runsvdir: do not use data/bss od: reuse bb_argv_dash last: do not go into endless loop on read error mount: make it not fail scripts/find_bad_common_bufsiz check dc: add INIT_G() (no-op for dc, but we want uniform usage of "G trick") function old new delta runsvdir_main 1646 1672 +26 set_pgrp 1 - -1 exitsoon 1 - -1 check 679 678 -1 svnum 4 - -4 svdir 4 - -4 sv 4 - -4 stamplog 4 - -4 rploglen 4 - -4 rplog 4 - -4 mount_main 995 988 -7 static.default_file_list 8 - -8 pfd 8 - -8 logpipe 8 - -8 static.info 20 - -20 brctl_main 767 739 -28 ------------------------------------------------------------------------------ (add/remove: 0/12 grow/shrink: 1/3 up/down: 26/-106) Total: -80 bytes text data bss dec hex filename 793327 662 7412 801401 c3a79 busybox_old 793329 641 7372 801342 c3a3e busybox_unstripped
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mount.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index a0e6cda73..d4a320756 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -214,9 +214,10 @@ struct globals {
214 unsigned verbose; 214 unsigned verbose;
215#endif 215#endif
216 llist_t *fslist; 216 llist_t *fslist;
217 char getmntent_buf[sizeof(bb_common_bufsiz1) - 8*3]; 217 char getmntent_buf[1];
218 218
219}; 219};
220enum { GETMNTENT_BUFSIZE = COMMON_BUFSIZE - offsetof(struct globals, getmntent_buf) };
220#define G (*(struct globals*)&bb_common_bufsiz1) 221#define G (*(struct globals*)&bb_common_bufsiz1)
221#define nfs_mount_version (G.nfs_mount_version) 222#define nfs_mount_version (G.nfs_mount_version)
222#if ENABLE_FEATURE_MOUNT_VERBOSE 223#if ENABLE_FEATURE_MOUNT_VERBOSE
@@ -1775,7 +1776,7 @@ int mount_main(int argc, char **argv)
1775 if (!mountTable) bb_error_msg_and_die("no %s", bb_path_mtab_file); 1776 if (!mountTable) bb_error_msg_and_die("no %s", bb_path_mtab_file);
1776 1777
1777 while (getmntent_r(mountTable, &mtpair[0], getmntent_buf, 1778 while (getmntent_r(mountTable, &mtpair[0], getmntent_buf,
1778 sizeof(getmntent_buf))) 1779 GETMNTENT_BUFSIZE))
1779 { 1780 {
1780 // Don't show rootfs. FIXME: why?? 1781 // Don't show rootfs. FIXME: why??
1781 // util-linux 2.12a happily shows rootfs... 1782 // util-linux 2.12a happily shows rootfs...
@@ -1842,8 +1843,8 @@ int mount_main(int argc, char **argv)
1842 // Get next fstab entry 1843 // Get next fstab entry
1843 1844
1844 if (!getmntent_r(fstab, mtcur, getmntent_buf 1845 if (!getmntent_r(fstab, mtcur, getmntent_buf
1845 + (mtcur==mtpair ? sizeof(getmntent_buf)/2 : 0), 1846 + (mtcur==mtpair ? GETMNTENT_BUFSIZE/2 : 0),
1846 sizeof(getmntent_buf)/2)) 1847 GETMNTENT_BUFSIZE/2))
1847 { 1848 {
1848 // Were we looking for something specific? 1849 // Were we looking for something specific?
1849 1850