diff options
author | Karel Zak | 2012-01-16 11:28:05 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-16 11:28:05 +0100 |
commit | 8b470b20d70eaf2daa84975af13130433c79d1f8 (patch) | |
tree | 10285844267726d04ad82d89a39c675d2b42e102 /sys-utils/mount.c | |
parent | mount: (new) print error messages (diff) | |
download | kernel-qcow2-util-linux-8b470b20d70eaf2daa84975af13130433c79d1f8.tar.gz kernel-qcow2-util-linux-8b470b20d70eaf2daa84975af13130433c79d1f8.tar.xz kernel-qcow2-util-linux-8b470b20d70eaf2daa84975af13130433c79d1f8.zip |
libmount: avoid duplicate loopdevs
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/mount.c')
-rw-r--r-- | sys-utils/mount.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys-utils/mount.c b/sys-utils/mount.c index de972a83d..c81af1af9 100644 --- a/sys-utils/mount.c +++ b/sys-utils/mount.c @@ -286,11 +286,15 @@ try_readonly: if (!mnt_context_syscall_called(cxt)) { /* - * libmount errors + * libmount errors (extra library checks) */ - if (rc == -EPERM) { + switch (rc) { + case -EPERM: warnx(_("only root can mount %s on %s"), src, tgt); return EX_USAGE; + case -EBUSY: + warnx(_("%s is already mounted"), src); + return EX_USAGE; } if (src == NULL || tgt == NULL) { |