r = sd_rtnl_open(&rtnl, 0);
if (r < 0) {
- log_error("Failed to connect to netlink: %s", strerror(-r));
+ log_error_errno(-r, "Failed to connect to netlink: %m");
return r;
}
r = sd_rtnl_call(rtnl, req, 0, &reply);
if (r < 0) {
- log_error("Failed to enumerate links: %s", strerror(-r));
+ log_error_errno(-r, "Failed to enumerate links: %m");
return r;
}
r = sd_rtnl_call(rtnl, req, 0, &reply);
if (r < 0) {
- log_error("Failed to query link: %s", strerror(-r));
+ log_error_errno(-r, "Failed to query link: %m");
return r;
}
r = sd_rtnl_open(&rtnl, 0);
if (r < 0) {
- log_error("Failed to connect to netlink: %s", strerror(-r));
+ log_error_errno(-r, "Failed to connect to netlink: %m");
return r;
}
r = sd_rtnl_call(rtnl, req, 0, &reply);
if (r < 0) {
- log_error("Failed to enumerate links: %s", strerror(-r));
+ log_error_errno(-r, "Failed to enumerate links: %m");
return r;
}