diff options
Diffstat (limited to 'libmount')
-rw-r--r-- | libmount/src/context.c | 2 | ||||
-rw-r--r-- | libmount/src/context_mount.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/libmount/src/context.c b/libmount/src/context.c index a370cea09..b945298e6 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -2362,7 +2362,7 @@ int mnt_context_get_excode( break; } - DBG(CXT, ul_debugobj(cxt, "return code: %d [%s]", rc, + DBG(CXT, ul_debugobj(cxt, "excode: rc=%d message=\"%s\"", rc, buf ? buf : "<no-message>")); return rc; } diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c index f2b42eb0b..9caee70e5 100644 --- a/libmount/src/context_mount.c +++ b/libmount/src/context_mount.c @@ -1311,6 +1311,8 @@ int mnt_context_get_mount_excode( /* * Libmount success && syscall success. */ + if (buf && mnt_context_forced_rdonly(cxt)) + snprintf(buf, bufsz, _("WARNING: device write-protected, mounted read-only")); return MNT_EX_SUCCESS; } |