summaryrefslogtreecommitdiffstats
path: root/sys-utils/mount.c
diff options
context:
space:
mode:
authorStanislav Brabec2016-07-14 15:28:58 +0200
committerKarel Zak2016-08-03 11:53:28 +0200
commit41c9e5d366d22eeb6592ac330ab75e1e4b28acec (patch)
tree2f4adba56dd397666ad7b63af1294f2d034eeb5b /sys-utils/mount.c
parentlibmount: Introduce new error: MNT_ERR_LOOPOVERLAP (diff)
downloadkernel-qcow2-util-linux-41c9e5d366d22eeb6592ac330ab75e1e4b28acec.tar.gz
kernel-qcow2-util-linux-41c9e5d366d22eeb6592ac330ab75e1e4b28acec.tar.xz
kernel-qcow2-util-linux-41c9e5d366d22eeb6592ac330ab75e1e4b28acec.zip
mount: Handle MNT_ERR_LOOPOVERLAP
Use warnx(), as there is no strerror() text associated with it. There is currently no easy way to report name and type of conflict. Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Diffstat (limited to 'sys-utils/mount.c')
-rw-r--r--sys-utils/mount.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
index 23856c171..92526cf78 100644
--- a/sys-utils/mount.c
+++ b/sys-utils/mount.c
@@ -455,6 +455,9 @@ try_readonly:
case -MNT_ERR_LOOPDEV:
warn(_("%s: failed to setup loop device"), src);
return MOUNT_EX_FAIL;
+ case -MNT_ERR_LOOPOVERLAP:
+ warnx(_("%s: overlapping loop device exists"), src);
+ return MOUNT_EX_FAIL;
default:
return handle_generic_errors(rc, _("%s: mount failed"),
tgt ? tgt : src);