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>
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);