log_debug("load: %s", m);
r = kmod_module_new_from_lookup(ctx, m, &modlist);
- if (r < 0) {
- log_error_errno(r, "Failed to lookup alias '%s': %m", m);
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to lookup alias '%s': %m", m);
if (!modlist) {
log_error("Failed to find module '%s'", m);
if (ignore_enoent && r == -ENOENT)
return 0;
- log_error_errno(r, "Failed to open %s, ignoring: %m", path);
- return r;
+ return log_error_errno(r, "Failed to open %s, ignoring: %m", path);
}
log_debug("apply: %s", path);
if (feof(f))
break;
- log_error("Failed to read file '%s', ignoring: %m", path);
+ log_error_errno(errno, "Failed to read file '%s', ignoring: %m", path);
return -errno;
}