File util-linux-loop-reuse-03.patch of Package util-linux.7828

From 41c9e5d366d22eeb6592ac330ab75e1e4b28acec Mon Sep 17 00:00:00 2001
From: Stanislav Brabec <sbrabec@suse.cz>
Date: Thu, 14 Jul 2016 15:28:58 +0200
Subject: [PATCH 3/20] 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>
---
 sys-utils/mount.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys-utils/mount.c b/sys-utils/mount.c
index 23856c1..92526cf 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);
-- 
2.9.2

openSUSE Build Service is sponsored by