aboutsummaryrefslogtreecommitdiff
path: root/util-linux/umount.c
AgeCommit message (Collapse)Author
2008-07-21- fix spellingBernhard Reutner-Fischer
2008-07-05*: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko
2008-05-26[u]mount: add/update dietlibc build fixDenis Vlasenko
2008-03-23patch: shrink by Pascal Bellard <pascal.bellard AT ads-lu.com> (-80 bytes)Denis Vlasenko
*: removal of #include <getopt.h>
2008-03-17*: add -Wunused-parameter; fix resulting breakageDenis Vlasenko
function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
2008-02-14umount: instead of non-standard -D, use -d with opposite meaningDenis Vlasenko
(closes bug 1604) umount: do not try to free loop device or erase mtab if remounted ro umount: do not complain several times about the same mountpoint function old new delta umount_main 646 638 -8 packed_usage 23662 23652 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-18) Total: -18 bytes
2007-12-24umount: fix fallout from stack reduction changeDenis Vlasenko
2007-11-10umount: stop using excessive aounts of stack. Surprisingly,Denis Vlasenko
code shrank a lot too function old new delta umount_main 751 640 -111
2007-11-10readlink: realpath requires PATH_MAX, bb_common_bufsiz1 can be too smallDenis Vlasenko
umount: don't actually need char[2 * PATH_MAX] for realpath
2007-10-11add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-09-06umount: support (by ignoring) -i; style fixesDenis Vlasenko
2007-08-18don't pass argc in getopt32, it's superfluousDenis Vlasenko
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
2007-05-26usage.c: remove reference to busybox.hDenis Vlasenko
*: s/include "busybox.h"/include "libbb.h"
2007-04-05[u]mount: extend -t option (Roy Marples <uberlord@gentoo.org>)Denis Vlasenko
2007-02-03suppress warnings about easch <applet>_main() havingDenis Vlasenko
no preceding prototype
2006-11-12umount: umount -a shouldn't stop on first failureDenis Vlasenko
2006-10-03getopt_ulflags -> getopt32.Denis Vlasenko
It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit.
2006-09-22Change license statements (and clean up headers) on some of the files thatRob Landley
Erik or I are primary copyright holders on.
2006-09-17whitespace cleanupDenis Vlasenko
2006-09-14umount: do not try to close FILE* which is NULL.Denis Vlasenko
2006-08-17The kernel can't handle umount /dev/hdc, we have to do it through mtab,Rob Landley
except that we still have to work when there is no mtab. Oh, and while we're at it, take advantage of the fact that modern processors avoid branches via conditional assignment where possible. ("x = a ? b : c;" turns into "x = c; if (a) x = b;" because that way there's no branch to potentially mispredict and thus never a bubble in the pipeline. The if(a) turns into an assembly test followed by a conditional assignment (rather than a conditional jump).) So since the compiler is going to do that _anyway_, we might as well take advantage of it to produce a slightly smaller binary. So there.
2006-08-03Fix umount so loop device disassociation hopefully doesn't screw up errno onRob Landley
a failed mount. And while I'm at it, legacy mdev removal was only being done in the _failure_ case? That can't be right. Plus minor header cleanups and an option parsing tweak.
2006-08-03Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
2006-06-15Patch from Yann Morin to put BLKGETSIZE64 in platform.h had rather a lot ofRob Landley
fallout due to the #include <sys/mount.h>. Removed that #include from various applets and fixed up those that were unhappy when that #include was made because they'd block copied stuff out of it. (Sigh.)
2006-03-17Bug fix: umount wasn't detaching loop devices unless mtab support was enabled.Rob Landley
Made some whitespace cleanups while I was there.
2006-03-06Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley
definitions. (That should only be on prototypes.)
2006-02-08Fix umount so it works if there's no /etc/mtab or /proc/mounts, makeRob Landley
umount -a into a CONFIG_FEATURE (why not?), and zap the now obsolete defconfig file (which was supposed to be part of the previous checkin).
2005-10-10better check usage with options, correct show problem error message, indent"Vladimir N. Oleynik"
2005-09-24Tito switched option parsing over to switch umount over to bb_getopt_ulflags().Rob Landley
2005-08-23When compiling with FEATURE_MTAB_SUPPORT disabled, the call to erase_mtab()Rob Landley
can never be made because useMtab is initialized to 0, and all the other assignments of that variable assign 0 to it. Any compiler that can perform simple constant propogation on local variables will optimize away if statements testing against that variable, thus the call to erase_mtab() will never be made. When compiling for arm using gcc 3.3.3 with FEATURE_MTAB_SUPPORT disabled, the linker complains that it can't find erase_mtab(). The arm optimizer isn't exactly the brightest member of the family, and apparently needs to be hit over the head with a hammer to get its' attention...
2005-08-10Major rewrite of mount, umount, losetup. Untangled lots of code, shrunkRob Landley
things down a bit, fixed a number of funky corner cases, added support for several new features (things like mount --move, mount --bind, lazy unounts, automatic detection of loop mounts, and so on). Probably broke several other things, but it's fixable. (Bang on it, tell me what doesn't work for you...) Note: you no longer need to say "-o loop". It does that for you when necessary. Still need to add "user mount" support, which involves making mount suid. Not too hard to do under the new infrastructure, just haven't done it yet... The previous code had the following notes, that belong in the version control comments: - * 3/21/1999 Charles P. Wright <cpwright@cpwright.com> - * searches through fstab when -a is passed - * will try mounting stuff with all fses when passed -t auto - * - * 1999-04-17 Dave Cinege...Rewrote -t auto. Fixed ro mtab. - * - * 1999-10-07 Erik Andersen <andersen@codepoet.org>. - * Rewrite of a lot of code. Removed mtab usage (I plan on - * putting it back as a compile-time option some time), - * major adjustments to option parsing, and some serious - * dieting all around. - * - * 1999-11-06 mtab support is back - andersee - * - * 2000-01-12 Ben Collins <bcollins@debian.org>, Borrowed utils-linux's - * mount to add loop support. - * - * 2000-04-30 Dave Cinege <dcinege@psychosis.com> - * Rewrote fstab while loop and lower mount section. Can now do - * single mounts from fstab. Can override fstab options for single - * mount. Common mount_one call for single mounts and 'all'. Fixed - * mtab updating and stale entries. Removed 'remount' default. - *
2004-08-03Tito, farmatito at tiscali dot it writes:Eric Andersen
Hi to all, This patch is useful for: 1) remove an unused var from extern char *find_real_root_device_name(const char* name) changing it to extern char *find_real_root_device_name(void). 2) fixes include/libbb.h, coreutils/df.c, util-linux/mount.c and util-linux/umount.c accordingly. 3) fixes a bug, really a false positive, in find_real_root_device_name() that happens if in the /dev directory exists a link named root (/dev/root) that should be skipped but is not. This affects applets like df that display wrong results
2004-03-15Remove trailing whitespace. Update copyright to include 2004.Eric Andersen
2004-02-22Patch from Chris Larson (kergoth), to allow multiple directores to beGlenn L McGrath
unmounted at once.
2003-07-14Update a bunch of docs. Run a script to update my email addr.Eric Andersen
2003-06-20Somewhere in the 2.4.x kernel series, /proc/mounts was changed to display aEric Andersen
"rootfs" entry as well as the traditional "/dev/root" entry. This caused applets such as mount and df to display two root filesystem entries.... This teaches the relevant utilities to ignore the "rootfs" entry. -Erik
2003-03-19Major coreutils update.Manuel Novoa III
2002-11-28Change if(x)free(x); to free(x);Aaron Lehmann
2001-12-20Remove `== TRUE' tests and convert `!= TRUE' and `== FALSE' tests to use !.Matt Kraai
2001-10-24Major rework of the directory structure and the entire build system.Eric Andersen
-Erik
2001-08-02Teach libc5 about realpathEric Andersen
-Erik
2001-05-15Patch from Vladimir:Eric Andersen
1) fixed a bug that could crash df, mount, and umount applets if the root device name was longer then the word "root" (/dev/loop1 vs /dev/root) - 2) severl functions needed static declaration in the umount applet 3) update declaration for function in last_char_is() in libbb
2001-05-02Canonicalize path before trying to unmount it.Matt Kraai
2001-04-01Move the mtab support stuff into libbbEric Andersen
-Erik
2001-03-21A nice patch from Larry Doolittle that adds -Wshadow andEric Andersen
cleans up most of the now-revealed problems.
2001-02-20It turns out that DODMALLOC was broken when I reorganized busybox.hEric Andersen
header file usage before the 0.49 release. To fix it, I had to move the '#include "busybox.h"' to the end of the list of #include files. -Erik
2001-02-14This patch, put together by Manuel Novoa III, is a merge of workEric Andersen
done by Evin Robertson (bug#1105) and work from Manuel to make usage messages occupy less space and simplify how usage messages are displayed.
2001-01-31Removed trailing \n from error_msg{,_and_die} messages.Matt Kraai
2001-01-27Fix up copyright msgs. Bump version to 0.49 in preparation forEric Andersen
a release. Update the website with release details. -Erik
2001-01-27Fix header file usage -- there were many unnecessary header files included inEric Andersen
busybox.h which slowed compiles. I left only what was needed and then fixed up all the apps to include their own header files. I also fixed naming for pwd.h and grp.h functions. Tested to compile and run with libc5, glibc, and uClibc. -Erik