summaryrefslogtreecommitdiffstats
path: root/libmount/src/context_mount.c
diff options
context:
space:
mode:
authorVaclav Dolezal2018-03-13 14:45:43 +0100
committerKarel Zak2018-06-11 15:51:17 +0200
commit8342e5840dd862d2d13f3b8be38dfa070c8d7236 (patch)
tree3b253fe70fbc4e204a923eb543e203c5552ef99f /libmount/src/context_mount.c
parentlibmount: note namespaces in mnt_reset_context() docs (diff)
downloadkernel-qcow2-util-linux-8342e5840dd862d2d13f3b8be38dfa070c8d7236.tar.gz
kernel-qcow2-util-linux-8342e5840dd862d2d13f3b8be38dfa070c8d7236.tar.xz
kernel-qcow2-util-linux-8342e5840dd862d2d13f3b8be38dfa070c8d7236.zip
libmount: added error MNT_ERR_NAMESPACE
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
Diffstat (limited to 'libmount/src/context_mount.c')
-rw-r--r--libmount/src/context_mount.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
index 6207bd814..9245d73dd 100644
--- a/libmount/src/context_mount.c
+++ b/libmount/src/context_mount.c
@@ -1452,6 +1452,10 @@ int mnt_context_get_mount_excode(
if (buf)
snprintf(buf, bufsz, _("locking failed"));
return MNT_EX_FILEIO;
+ case -MNT_ERR_NAMESPACE:
+ if (buf)
+ snprintf(buf, bufsz, _("failed to switch namespace"));
+ return MNT_EX_SYSERR;
default:
return mnt_context_get_generic_excode(rc, buf, bufsz, _("mount failed: %m"));
}
@@ -1465,6 +1469,10 @@ int mnt_context_get_mount_excode(
if (buf)
snprintf(buf, bufsz, _("filesystem was mounted, but failed to update userspace mount table"));
return MNT_EX_FILEIO;
+ } else if (rc == -MNT_ERR_NAMESPACE) {
+ if (buf)
+ snprintf(buf, bufsz, _("filesystem was mounted, but failed to switch namespace back"));
+ return MNT_EX_SYSERR;
} else if (rc < 0)
return mnt_context_get_generic_excode(rc, buf, bufsz,