From: Karel Zak Date: Thu, 23 Sep 2021 09:07:55 +0000 (+0200) Subject: mount: add hint about dmesg(8) to error messages X-Git-Tag: v2.38-rc1~249 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79534c0d7e0fdb52b090479f87ccc0870c993efe;p=thirdparty%2Futil-linux.git mount: add hint about dmesg(8) to error messages Fixes: https://github.com/karelzak/util-linux/pull/1444 Signed-off-by: Karel Zak --- diff --git a/sys-utils/mount.c b/sys-utils/mount.c index ceb0bb469a..ac7af42cb1 100644 --- a/sys-utils/mount.c +++ b/sys-utils/mount.c @@ -354,6 +354,10 @@ static int mk_exit_code(struct libmnt_context *cxt, int rc) if (!spec) spec = "???"; warnx("%s: %s.", spec, buf); + + if (mnt_context_syscall_called(cxt) && + mnt_context_get_syscall_errno(cxt) != 0) + fprintf(stderr, _(" dmesg(1) may have more information after failed mount system call.\n")); } if (rc == MNT_EX_SUCCESS && mnt_context_get_status(cxt) == 1) {