size_t l;
r = proc_cmdline(&line);
- if (r < 0)
- log_warning("Failed to read /proc/cmdline, ignoring: %s",
- strerror(-r));
- if (r <= 0)
+ if (r < 0) {
+ log_warning_errno(r, "Failed to read /proc/cmdline, ignoring: %m");
return true;
+ }
FOREACH_WORD_QUOTED(word, l, line, state)
if (strneq(word, "net.ifnames=0", l))
r = conf_files_list_strv(&files, ".link", NULL, link_dirs);
if (r < 0) {
- log_error("failed to enumerate link files: %s", strerror(-r));
+ log_error_errno(r, "failed to enumerate link files: %m");
return r;
}