aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2024-01-18 09:10:45 -0800
committerTony Luck <tony.luck@intel.com>2024-01-18 09:26:30 -0800
commitf5615e9a2f840ad1238e8a7edc25f2f9fc4c3ba3 (patch)
tree24b83473aa311638698ea09e4044820721dc48c2
parenta325ae1895634e990bed37a51f4190931cbd578c (diff)
downloadmcelog-f5615e9a2f840ad1238e8a7edc25f2f9fc4c3ba3.tar.gz
mcelog: Add kernel CONFIG message if /dev/mcelog isn't found
Linux kernel made support for /dev/mcelog optional in v4.12. Most distributions built with CONFIG_X86_MCELOG_LEGACY=y for a while. But some have started to drop it. When /dev/mcelog cannot be opened, provide an extra message to tell users to check if their kernel is built with this option. Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--mcelog.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mcelog.c b/mcelog.c
index 40d4bad..dc6e8a6 100644
--- a/mcelog.c
+++ b/mcelog.c
@@ -1383,6 +1383,7 @@ int main(int ac, char **av)
if (ignore_nodev)
exit(0);
SYSERRprintf("Cannot open `%s'", logfn);
+ SYSERRprintf("Is your kernel built with CONFIG_X86_MCELOG_LEGACY=y?");
exit(1);
}