aboutsummaryrefslogtreecommitdiff
path: root/util-linux/losetup.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Convert all util-linux/* applets to "new style" applet definitionsDenys Vlasenko2016-11-231-0/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* losetup: assorted fixes. Closes 6314Denys Vlasenko2013-06-271-16/+21
| | | | | | | | | | | | | "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>
* losetup: fix util-linux compatibilityMandeep Singh Baines2013-03-121-51/+65
| | | | | | | | | | | 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>
* losetup: implement -r option. Closes 4033.Denys Vlasenko2011-09-121-7/+9
| | | | | | | | | | 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>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-2/+1
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move remaining help text from include/usage.src.hPere Orga2011-04-111-0/+18
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | 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>
* losetup: use LOOP_foo definesLauri Kasanen2010-07-041-2/+2
| | | | | Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* modprobe: add support for -l and -s. Remove some unsupported optionsPascal Bellard2010-06-071-1/+1
| | | | | | | | | | | | 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>
* losetup: support /dev/loop10 and higher. closes bug 1627Denys Vlasenko2010-05-191-25/+34
| | | | | | | | function old new delta query_loop 91 95 +4 losetup_main 288 285 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* - commentary typo fixBernhard Reutner-Fischer2008-07-211-1/+1
|
* patch: shrink by Pascal Bellard <pascal.bellard AT ads-lu.com> (-80 bytes)Denis Vlasenko2008-03-231-2/+0
| | | | | *: removal of #include <getopt.h>
* perror_nomsg: don't print extra colonDenis Vlasenko2007-12-221-3/+3
| | | | | losetup: print name of loop device in error messages
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* printf("%s\n") -> puts()Denis Vlasenko2007-10-011-1/+1
|
* losetup: support -f (Loic Grenie <loic.grenie@gmail.com>)Denis Vlasenko2007-09-261-23/+37
| | | | | | | | | 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
* don't pass argc in getopt32, it's superfluousDenis Vlasenko2007-08-181-1/+1
| | | | | | | | (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
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-2/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* loop device code: readability improvementDenis Vlasenko2007-04-191-3/+6
|
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* attempt to regularize atoi mess.Denis Vlasenko2006-10-081-2/+2
|
* 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.
* losetup: use /dev/loopN or /dev/loop/N according to CONFIG_FEATURE_DEVFS=n/yDenis Vlasenko2006-09-291-2/+2
|
* losetup: with no arguments lists all /dev/loopN. Corrected help text.Denis Vlasenko2006-09-271-3/+15
| | | | (patch by Vladimir Dronnikov <dronnikov@gmail.ru>)
* losetup: getopt_ulflags'ification + small fix for perror_nomsgDenis Vlasenko2006-09-221-33/+35
|
* Standardize on the vi editing directives being on the first line."Robert P. J. Day"2006-07-021-0/+1
|
* just whitespaceTim Riker2006-01-251-8/+8
|
* - revert last change for now..Bernhard Reutner-Fischer2006-01-131-15/+2
|
* this applet needlessly big! TODO: bb_getopt_ulflags()Bernhard Reutner-Fischer2006-01-131-1/+1
| | | | - use atol for the offset, which is always in bytes. Small step in eventually dropping bb_xparse_number().
* When you went "losetup -d /dev/loop0 /dev/loop1" the error message was strange.Rob Landley2005-12-211-1/+2
|
* Fix losetup so that it A) actually works again, B) has much better errorRob Landley2005-11-291-8/+16
| | | | | | | | 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...
* Major rewrite of mount, umount, losetup. Untangled lots of code, shrunkRob Landley2005-08-101-27/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. - *
* Lars Ekman writes:Eric Andersen2003-07-301-0/+1
| | | | | | | | | | | | | | | | | | | | | 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
* Major coreutils update.Manuel Novoa III2003-03-191-3/+3
|
* * include/applets.h (CONFIG_LOSETUP): New.Matt Kraai2002-03-201-0/+58
* 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.