util-linux/mount
Petr Uzel f4612577c9 umount: allow unmounting loopdev specified by associated file
Make it possible to unmount a filesystem on a loop device if it is
specified by associated backing file. It does not attempt to unmount
anything if there are more than one loop device associated with the
given file.

Umount looks for associated loopdevice(s) only if umount is called
with the regular file as an argument.

Before:
	mount -o loop -t ext2 img mnt
	umount -v img
	> Could not find /home/puzel/upstream/util-linux/img in mtab
	> umount: img: not mounted

After:
	mount -o loop -t ext2 img mnt
	umount -v img
	> img is associated with /dev/loop0, trying to unmount it
	> /dev/loop0 has been unmounted

[kzak@redhat.com: - fix memory leak in lomount.c]

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=666161
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 14:54:43 +01:00
..
.gitignore build-sys: move pivot_root(8) to sys-utils 2008-11-19 12:38:43 +01:00
Makefile.am build-sys: add --enable-libmount-mount 2011-01-03 12:28:47 +01:00
README.mount rename util-linux-ng back to util-linux 2010-11-30 11:41:59 +01:00
devname.c mount: don't canonicalize "spec" with --no-canonicalize option 2010-10-07 16:31:29 +02:00
devname.h mount: generic blkid/volume_id wrapper, use blkid_evaluate_* 2009-02-17 01:18:22 +01:00
fstab.5 rename util-linux-ng back to util-linux 2010-11-30 11:41:59 +01:00
fstab.c mount: add rootcontext= for tmpfs on SELinux boxes 2011-02-09 14:15:02 +01:00
fstab.h mount: add rootcontext= for tmpfs on SELinux boxes 2011-02-09 14:15:02 +01:00
getusername.c Imported from util-linux-2.9i tarball. 2006-12-07 00:25:37 +01:00
getusername.h Imported from util-linux-2.9i tarball. 2006-12-07 00:25:37 +01:00
lomount.c umount: allow unmounting loopdev specified by associated file 2011-02-21 14:54:43 +01:00
lomount.h umount: allow unmounting loopdev specified by associated file 2011-02-21 14:54:43 +01:00
loop.h losetup: add --set-capacity 2009-05-29 21:46:00 +02:00
losetup.8 rename util-linux-ng back to util-linux 2010-11-30 11:41:59 +01:00
mount.8 mount: fix atime description in mount.8 man page 2011-01-27 14:04:18 +01:00
mount.c mount: add rootcontext= for tmpfs on SELinux boxes 2011-02-09 14:15:02 +01:00
mount_constants.h mount: Add strictatime support 2009-03-27 13:13:22 +01:00
mount_mntent.c libmount: cleanup mangle() usage 2011-01-03 12:28:47 +01:00
mount_mntent.h build-sys: remove DEFAULT_INCLUDES workaround 2007-01-04 14:39:17 +01:00
sundries.c losetup: remove unnecessary fstab.h include 2011-01-03 12:28:47 +01:00
sundries.h mount: add --no-canonicalize option 2009-12-03 15:30:53 +01:00
swap_constants.h Imported from util-linux-2.9i tarball. 2006-12-07 00:25:37 +01:00
swapoff.8 Imported from util-linux-2.2 tarball. 2006-12-07 00:25:32 +01:00
swapon.8 rename util-linux-ng back to util-linux 2010-11-30 11:41:59 +01:00
swapon.c build-sys: provide alternatives for err, errx, warn and warnx 2011-02-14 17:45:24 +01:00
umount.8 rename util-linux-ng back to util-linux 2010-11-30 11:41:59 +01:00
umount.c umount: allow unmounting loopdev specified by associated file 2011-02-21 14:54:43 +01:00
xmalloc.c mount: cleanup error() and die() 2007-10-25 21:50:59 +02:00
xmalloc.h mount: remove useless if-before-my_free, define my_free as a macro 2008-03-12 12:28:50 +01:00

README.mount

mount/umount for Linux 0.97.3 and later.
Authors:
Doug Quale <quale@saavik.cs.wisc.edu>,
H.J. Lu <hlu@eecs.wsu.edu>,
Rick Sladkey <jrs@world.std.com>,
Stephen Tweedie <sct@dcs.ed.ac.uk>.
Andries Brouwer <aeb@cwi.nl>
Adrian Bunk <bunk@stusta.de>

Presently in util-linux maintained by Karel Zak <kzak@redhat.com>.