diff options
Diffstat (limited to 'libmount/src/context_mount.c')
-rw-r--r-- | libmount/src/context_mount.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c index 65f7dbfd0..e84947f00 100644 --- a/libmount/src/context_mount.c +++ b/libmount/src/context_mount.c @@ -1379,6 +1379,10 @@ int mnt_context_get_mount_excode( if (buf) snprintf(buf, bufsz, _("overlapping loop device exists for %s"), src); return MNT_EX_FAIL; + case -MNT_ERR_LOCK: + if (buf) + snprintf(buf, bufsz, _("locking failed")); + return MNT_EX_FILEIO; default: return mnt_context_get_generic_excode(rc, buf, bufsz, _("mount failed: %m")); } @@ -1388,7 +1392,12 @@ int mnt_context_get_mount_excode( * mount(2) syscall success, but something else failed * (probably error in mtab processing). */ - if (rc < 0) + if (rc == -MNT_ERR_LOCK) { + if (buf) + snprintf(buf, bufsz, _("filesystem was mounted, but failed to update userspace mount table")); + return MNT_EX_FILEIO; + + } else if (rc < 0) return mnt_context_get_generic_excode(rc, buf, bufsz, _("filesystem was mounted, but any subsequent operation failed: %m")); |