The function returns the error code itself, so we should be using
strerror(-err) instead.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/368
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
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;
}