summaryrefslogtreecommitdiff
path: root/util-linux/umount.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* [u]mount: extend -t option (Roy Marples <uberlord@gentoo.org>)Denis Vlasenko2007-04-051-3/+7
|
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* umount: umount -a shouldn't stop on first failureDenis Vlasenko2006-11-121-5/+6
|
* getopt_ulflags -> getopt32.Denis Vlasenko2006-10-031-2/+2
| | | | | | | | 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.
* Change license statements (and clean up headers) on some of the files thatRob Landley2006-09-221-4/+1
| | | | Erik or I are primary copyright holders on.
* whitespace cleanupDenis Vlasenko2006-09-171-1/+1
|
* umount: do not try to close FILE* which is NULL.Denis Vlasenko2006-09-141-11/+13
|
* The kernel can't handle umount /dev/hdc, we have to do it through mtab,Rob Landley2006-08-171-8/+14
| | | | | | | | | | | | | | 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.
* Fix umount so loop device disassociation hopefully doesn't screw up errno onRob Landley2006-08-031-16/+12
| | | | | | 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.
* Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley2006-08-031-2/+2
| | | | | | | | | | 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.)
* Patch from Yann Morin to put BLKGETSIZE64 in platform.h had rather a lot ofRob Landley2006-06-151-5/+1
| | | | | | 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.)
* Bug fix: umount wasn't detaching loop devices unless mtab support was enabled.Rob Landley2006-03-171-35/+38
| | | | Made some whitespace cleanups while I was there.
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley2006-03-061-1/+1
| | | | definitions. (That should only be on prototypes.)
* Fix umount so it works if there's no /etc/mtab or /proc/mounts, makeRob Landley2006-02-081-27/+28
| | | | | 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).
* better check usage with options, correct show problem error message, indent"Vladimir N. Oleynik"2005-10-101-18/+19
|
* Tito switched option parsing over to switch umount over to bb_getopt_ulflags().Rob Landley2005-09-241-27/+31
|
* When compiling with FEATURE_MTAB_SUPPORT disabled, the call to erase_mtab()Rob Landley2005-08-231-1/+3
| | | | | | | | | | | | | 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...
* Major rewrite of mount, umount, losetup. Untangled lots of code, shrunkRob Landley2005-08-101-263/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. - *
* Tito, farmatito at tiscali dot it writes:Eric Andersen2004-08-031-1/+1
| | | | | | | | | | | 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
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-3/+3
|
* Patch from Chris Larson (kergoth), to allow multiple directores to beGlenn L McGrath2004-02-221-7/+10
| | | | unmounted at once.
* Update a bunch of docs. Run a script to update my email addr.Eric Andersen2003-07-141-2/+1
|
* Somewhere in the 2.4.x kernel series, /proc/mounts was changed to display aEric Andersen2003-06-201-1/+3
| | | | | | | | "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
* Major coreutils update.Manuel Novoa III2003-03-191-11/+10
|
* Change if(x)free(x); to free(x);Aaron Lehmann2002-11-281-4/+2
|
* Remove `== TRUE' tests and convert `!= TRUE' and `== FALSE' tests to use !.Matt Kraai2001-12-201-7/+7
|
* Major rework of the directory structure and the entire build system.Eric Andersen2001-10-241-15/+14
| | | | -Erik
* Teach libc5 about realpathEric Andersen2001-08-021-0/+5
| | | | -Erik
* Patch from Vladimir:Eric Andersen2001-05-151-17/+16
| | | | | | | 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
* Canonicalize path before trying to unmount it.Matt Kraai2001-05-021-1/+6
|
* Move the mtab support stuff into libbbEric Andersen2001-04-011-4/+4
| | | | -Erik
* A nice patch from Larry Doolittle that adds -Wshadow andEric Andersen2001-03-211-6/+8
| | | | cleans up most of the now-revealed problems.
* It turns out that DODMALLOC was broken when I reorganized busybox.hEric Andersen2001-02-201-1/+1
| | | | | | 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
* This patch, put together by Manuel Novoa III, is a merge of workEric Andersen2001-02-141-2/+2
| | | | | | done by Evin Robertson (bug#1105) and work from Manuel to make usage messages occupy less space and simplify how usage messages are displayed.
* Removed trailing \n from error_msg{,_and_die} messages.Matt Kraai2001-01-311-4/+4
|
* Fix up copyright msgs. Bump version to 0.49 in preparation for0_49Eric Andersen2001-01-271-1/+1
| | | | | a release. Update the website with release details. -Erik
* Fix header file usage -- there were many unnecessary header files included inEric Andersen2001-01-271-0/+2
| | | | | | | 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
* #define -> static const int. Also got rid of some big static buffers.Mark Whitley2001-01-231-4/+4
|
* Fix the exit status of umount -a, a casualty of the TRUE/FALSE normalization.Matt Kraai2001-01-171-4/+4
| | | | Thanks to Francois-R Boyer <boyerf@IRO.UMontreal.CA> for the report.
* Use busybox error handling functions wherever possible.Matt Kraai2000-12-221-3/+2
|
* Changed names of functions in utility.c and all affected files, to makeMark Whitley2000-12-071-4/+4
| | | | compliant with the style guide. Everybody rebuild your tags file!
* Fix exit status on failure.Matt Kraai2000-12-061-1/+1
|
* Stop using TRUE and FALSE for exit status.Matt Kraai2000-12-011-3/+6
|
* Renamed "internal.h" to the more sensible "busybox.h".Eric Andersen2000-09-251-1/+1
| | | | -Erik
* Use BB_FEATURE_CLEAN_UP where appropriateEric Andersen2000-07-251-1/+4
| | | | -Erik
* Extract usage information into a separate file.Matt Kraai2000-07-161-22/+0
|
* Use errorMsg rather than fprintf.Matt Kraai2000-07-141-5/+3
|
* Always report the applet name when doing error reporting.Matt Kraai2000-07-121-1/+1
|
* Argh. More cross libc cleanup. Should be ok now...Eric Andersen2000-07-081-18/+5
| | | | -Erik