From 0361cb6f9bb8f74438c0577d968eb6f4bf9a2515 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 28 Apr 2017 11:03:24 +0200 Subject: libmount: add read-only warning Signed-off-by: Karel Zak --- sys-utils/mount.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sys-utils/mount.c') 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; } -- cgit v1.2.3-55-g7522