From: Emil Velikov Date: Wed, 4 Jun 2025 16:16:25 +0000 (+0100) Subject: tools/depmod: don't use %m on kmod_new() failure X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=994da3b8d2abb161ce218f1102f92357329111ff;p=thirdparty%2Fkmod.git 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 --- 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; }