From 994da3b8d2abb161ce218f1102f92357329111ff Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 4 Jun 2025 17:16:25 +0100 Subject: [PATCH] tools/depmod: don't use %m on kmod_new() failure The KMOD API returns NULL on error and getting the exact means why it failed is undefined. In practise the errno is set in _some_ of the error paths, but not all. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/368 Signed-off-by: Lucas De Marchi --- tools/depmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/depmod.c b/tools/depmod.c index 9ec47dbc..355483ad 100644 --- a/tools/depmod.c +++ b/tools/depmod.c @@ -3030,7 +3030,7 @@ static int do_depmod(int argc, char *argv[]) ctx = kmod_new(cfg.dirname, &null_kmod_config); if (ctx == NULL) { - CRIT("kmod_new(\"%s\", {NULL}) failed: %m\n", cfg.dirname); + CRIT("kmod_new(\"%s\", {NULL}) failed\n", cfg.dirname); goto cmdline_failed; } -- 2.47.3