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"));
}
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,
if (buf)
snprintf(buf, bufsz, _("locking failed"));
return MNT_EX_FILEIO;
+ } else if (rc == -MNT_ERR_NAMESPACE) {
+ if (buf)
+ snprintf(buf, bufsz, _("failed to switch namespace"));
+ return MNT_EX_SYSERR;
}
return mnt_context_get_generic_excode(rc, buf, bufsz,
_("umount failed: %m"));
if (buf)
snprintf(buf, bufsz, _("filesystem was unmounted, but failed to update userspace mount table"));
return MNT_EX_FILEIO;
+ } else if (rc == -MNT_ERR_NAMESPACE) {
+ if (buf)
+ snprintf(buf, bufsz, _("filesystem was unmounted, but failed to switch namespace back"));
+ return MNT_EX_SYSERR;
} else if (rc < 0)
return mnt_context_get_generic_excode(rc, buf, bufsz,
* failed to lock mtab/utab or so.
*/
#define MNT_ERR_LOCK 5008
+/**
+ * MNT_ERR_NAMESPACE:
+ *
+ * failed to switch namespace
+ */
+#define MNT_ERR_NAMESPACE 5009
/*