***/
#include <netinet/ether.h>
-#include <linux/netdevice.h>
#include "sd-id128.h"
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))
if (!enable_name_policy()) {
ctx->enable_name_policy = false;
- log_info("Network interface NamePolicy= disabled on kernel commandline, ignoring.");
+ log_info("Network interface NamePolicy= disabled on kernel command line, ignoring.");
}
/* update timestamp */
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;
}