r = sd_rtnl_message_new_route(NULL, &req, RTM_NEWROUTE, AF_INET, RTPROT_STATIC);
if (r < 0) {
- log_error("Could not create RTM_NEWROUTE message: %s", strerror(-r));
+ log_error_errno(-r, "Could not create RTM_NEWROUTE message: %m");
return;
}
r = sd_rtnl_message_append_in_addr(req, RTA_GATEWAY, &addr);
if (r < 0) {
- log_error("Could not append RTA_GATEWAY attribute: %s", strerror(-r));
+ log_error_errno(-r, "Could not append RTA_GATEWAY attribute: %m");
return;
}
r = sd_rtnl_message_append_u32(req, RTA_OIF, index);
if (r < 0) {
- log_error("Could not append RTA_OIF attribute: %s", strerror(-r));
+ log_error_errno(-r, "Could not append RTA_OIF attribute: %m");
return;
}
r = sd_rtnl_message_get_errno(m);
- log_info("%d left in pipe. got reply: %s", *counter, strerror(-r));
+ log_info_errno(-r, "%d left in pipe. got reply: %m", *counter);
assert_se(r >= 0);