Age | Commit message (Collapse) | Author |
|
The "autolooped" mount (mount [-oloop] IMAGE /DIR/DIR)
always creates AUTOCLEARed loopdevs, so that umounting
drops them (and this does not require any code in the
umount userspace).
This happens since circa linux-2.6.25:
commit 96c5865559cee0f9cbc5173f3c949f6ce3525581
Date: Wed Feb 6 01:36:27 2008 -0800
Subject: Allow auto-destruction of loop devices
IOW: in this case, umount does not have to use -d
to drop the loopdev.
The explicit loop mount (mount /dev/loopN /DIR/DIR)
does not do this. In this case, umount without -d
should not drop loopdev.
Unfortunately, bbox umount currently always implies -d,
this probably needs fixing.
function old new delta
set_loop 537 597 +60
singlemount 1101 1138 +37
losetup_main 419 432 +13
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 110/0) Total: 110 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
"losetup -d" was not complaining that LOOPDEV is missing.
"losetup -a" was listing only up to /dev/loop9.
"losetup -f" looped forever if llop0 was taken, and never tried
anything after /dev/loop9.
"-o" with other options (say, -r) had no effect.
function old new delta
losetup_main 376 419 +43
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Added -a support. Also made sure -f works as follows:
losetup [-r] [-o offset] {-f|loopdev} file
Removed support for 'losetup -r' with no arguments.
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
function old new delta
packed_usage 28595 28633 +38
losetup_main 285 290 +5
singlemount 906 908 +2
set_loop 674 672 -2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
packed_usage 28706 28623 -83
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Fixed some goofs in help text
function old new delta
modprobe_main 494 653 +159
packed_usage 27129 27145 +16
insmod_main 98 95 -3
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
query_loop 91 95 +4
losetup_main 288 285 -3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
|
|
*: removal of #include <getopt.h>
|
|
losetup: print name of loop device in error messages
|
|
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
|
|
|
|
function old new delta
losetup_main 238 278 +40
packed_usage 23021 23027 +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 46/0) Total: 46 bytes
|
|
(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
|
|
*: s/include "busybox.h"/include "libbb.h"
|
|
|
|
no preceding prototype
|
|
|
|
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.
|
|
|
|
(patch by Vladimir Dronnikov <dronnikov@gmail.ru>)
|
|
|
|
|
|
|
|
|
|
- use atol for the offset, which is always in bytes. Small step in eventually dropping bb_xparse_number().
|
|
|
|
messages, C) can show the current association (if any) when called
with only one argument. Update the documentation a lot too.
Remind me to add a test suite for this thing. I think I've figured out
how to handle root-only testsuites...
|
|
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.
- *
|
|
When using "losetup" the device is always setup as Read-Only.
(I have only tested with the -o flag, but looking at the code the
problem seems general)
The problem is the "opt" variable in "losetup.c" that is reused in
the "set_loop()" call. Clear it before the call and everything is OK;
opt = 0; /* <-------- added line */
if (delete)
return del_loop (argv[optind]) ? EXIT_SUCCESS : EXIT_FAILURE;
else
return set_loop (argv[optind], argv[optind + 1], offset, &opt)
? EXIT_FAILURE : EXIT_SUCCESS;
}
Best Regards,
Lars Ekman
|
|
|
|
* include/usage.h (losetup_trivial_usage, losetup_full_usage): New.
* util-linux/Makefile: Add losetup.o.
* util-linux/config.in: Add losetup prompt.
* util-linux/losetup.c: New.
|