From 5c226b6fa0da0284d675bd1ae96b12c0b88e2eae 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 mkdir_p() failure The function returns the error code itself, so we should be using strerror(-err) instead. 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 9b0a9cd9..9ec47dbc 100644 --- a/tools/depmod.c +++ b/tools/depmod.c @@ -2580,7 +2580,7 @@ static int depmod_output(struct depmod *depmod, FILE *out) else { err = mkdir_p(dname, strlen(dname), 0755); if (err < 0) { - CRIT("could not create directory %s: %m\n", dname); + CRIT("could not create directory %s: %s\n", dname, strerror(-err)); return err; } dfd = open(dname, O_RDONLY); -- 2.47.3