From 077323d034a6bdb565ba2608472eb239db27ff59 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 4 Jun 2025 17:16:25 +0100 Subject: [PATCH] tools/static-nodes: don't use %m on mkdir_parents() 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/static-nodes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/static-nodes.c b/tools/static-nodes.c index c2ba1f80..49f55549 100644 --- a/tools/static-nodes.c +++ b/tools/static-nodes.c @@ -233,8 +233,8 @@ static int do_static_nodes(int argc, char *argv[]) r = mkdir_parents(output, 0755); if (r < 0) { fprintf(stderr, - "Error: could not create parent directory for %s - %m.\n", - output); + "Error: could not create parent directory for %s - %s.\n", + output, strerror(-r)); ret = EXIT_FAILURE; goto finish; } -- 2.47.3