]> git.ipfire.org Git - thirdparty/util-linux.git/commit
mount: first look for mountpoint
authorKarel Zak <kzak@redhat.com>
Wed, 29 Jun 2011 07:02:50 +0000 (09:02 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 29 Jun 2011 07:02:50 +0000 (09:02 +0200)
commit067e9b4934372f72b89b2c0442a3d28290834537
treee912560ca947cfe48213591e8c670d47fae36510
parent159fb11ebe89339460455327b000f48b8a0d56b8
mount: first look for mountpoint

  # mount <device|dir>

The current code looks for a device and then for a mountpoint in
/etc/fstab. This is not user friendly solution. People usually use

 # mount /dir

to mount any filesystem. It makes more sense to check for mountpoint
and if not found then for device.

This is also important for bind mounts, for example if you have in
your fstab:

/dev/sda1 /mnt/foo auto defaults
/mnt/foo /mnt/bar none bind

then
# mount /mnt/foo

should be interpreted as the first entry and /dev/sda1 should be
mounted.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=716483
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/mount.8
mount/mount.c