summaryrefslogtreecommitdiffstats
path: root/sys-utils/mount.c
diff options
context:
space:
mode:
authorKarel Zak2017-04-28 11:03:24 +0200
committerKarel Zak2017-04-28 11:03:24 +0200
commit0361cb6f9bb8f74438c0577d968eb6f4bf9a2515 (patch)
treec1a3ca87fbc4a940d6227141a91277dc1c3c2607 /sys-utils/mount.c
parentinclude/exitcodes: remove mount(8) exit codes (diff)
downloadkernel-qcow2-util-linux-0361cb6f9bb8f74438c0577d968eb6f4bf9a2515.tar.gz
kernel-qcow2-util-linux-0361cb6f9bb8f74438c0577d968eb6f4bf9a2515.tar.xz
kernel-qcow2-util-linux-0361cb6f9bb8f74438c0577d968eb6f4bf9a2515.zip
libmount: add read-only warning
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/mount.c')
-rw-r--r--sys-utils/mount.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
index 9d5c6e1bd..4d7a5fc73 100644
--- a/sys-utils/mount.c
+++ b/sys-utils/mount.c
@@ -305,12 +305,8 @@ static int mk_exit_code(struct libmnt_context *cxt, int rc)
warnx(_("%s: %s."), spec, buf);
}
- if (rc == MNT_EX_SUCCESS) {
- if (mnt_context_get_status(cxt) == 1)
- selinux_warning(cxt, tgt);
-
- if (mnt_context_forced_rdonly(cxt))
- warnx(_("%s: WARNING: device write-protected, mounted read-only."), tgt);
+ if (rc == MNT_EX_SUCCESS && mnt_context_get_status(cxt) == 1) {
+ selinux_warning(cxt, tgt);
}
return rc;
}