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