mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
tree-wide: fix log messages using %m without an errno
This commit is contained in:
@@ -2189,7 +2189,7 @@ void home_process_notify(Home *h, char **l, int fd) {
|
||||
return (void) log_debug_errno(r, "Failed to parse SYSTEMD_LUKS_LOCK_FD value: %m");
|
||||
if (r > 0) {
|
||||
if (taken_fd < 0)
|
||||
return (void) log_debug("Got notify message with SYSTEMD_LUKS_LOCK_FD=1 but no fd passed, ignoring: %m");
|
||||
return (void) log_debug("Got notify message with SYSTEMD_LUKS_LOCK_FD=1 but no fd passed, ignoring.");
|
||||
|
||||
close_and_replace(h->luks_lock_fd, taken_fd);
|
||||
|
||||
@@ -2199,7 +2199,7 @@ void home_process_notify(Home *h, char **l, int fd) {
|
||||
home_maybe_close_luks_lock_fd(h, _HOME_STATE_INVALID);
|
||||
} else {
|
||||
if (taken_fd >= 0)
|
||||
return (void) log_debug("Got notify message with SYSTEMD_LUKS_LOCK_FD=0 but fd passed, ignoring: %m");
|
||||
return (void) log_debug("Got notify message with SYSTEMD_LUKS_LOCK_FD=0 but fd passed, ignoring.");
|
||||
|
||||
h->luks_lock_fd = safe_close(h->luks_lock_fd);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ static void ipv4ll_handler(sd_ipv4ll *ll, int event, void *userdata) {
|
||||
case SD_IPV4LL_EVENT_BIND:
|
||||
r = ipv4ll_address_claimed(ll, link);
|
||||
if (r < 0) {
|
||||
log_link_error(link, "Failed to configure ipv4ll address: %m");
|
||||
log_link_error_errno(link, r, "Failed to configure ipv4ll address: %m");
|
||||
link_enter_failed(link);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1123,7 +1123,7 @@ int manager_rtnl_process_nexthop(sd_netlink *rtnl, sd_netlink_message *message,
|
||||
log_warning_errno(r, "rtnl: could not get NHA_ID attribute, ignoring: %m");
|
||||
return 0;
|
||||
} else if (id == 0) {
|
||||
log_warning("rtnl: received nexthop message with invalid nexthop ID, ignoring: %m");
|
||||
log_warning("rtnl: received nexthop message with invalid nexthop ID, ignoring.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ int manager_genl_process_nl80211_config(sd_netlink *genl, sd_netlink_message *me
|
||||
}
|
||||
|
||||
if (!streq(ifname, link->ifname)) {
|
||||
log_link_debug(link, "nl80211: received %s(%u) message with invalid interface name '%s', ignoring: %m",
|
||||
log_link_debug(link, "nl80211: received %s(%u) message with invalid interface name '%s', ignoring.",
|
||||
strna(nl80211_cmd_to_string(cmd)), cmd, ifname);
|
||||
return 0;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ int manager_genl_process_nl80211_config(sd_netlink *genl, sd_netlink_message *me
|
||||
}
|
||||
if (r >= 0) {
|
||||
if (len == 0) {
|
||||
log_link_debug(link, "nl80211: received SSID has zero length, ignoring it: %m");
|
||||
log_link_debug(link, "nl80211: received SSID has zero length, ignoring it.");
|
||||
ssid = mfree(ssid);
|
||||
} else if (strlen_ptr(ssid) != len) {
|
||||
log_link_debug(link, "nl80211: received SSID contains NUL characters, ignoring it.");
|
||||
|
||||
@@ -409,8 +409,7 @@ int manager_genl_process_nl80211_wiphy(sd_netlink *genl, sd_netlink_message *mes
|
||||
(void) wiphy_get_by_index(manager, index, &w);
|
||||
|
||||
switch (cmd) {
|
||||
case NL80211_CMD_NEW_WIPHY: {
|
||||
|
||||
case NL80211_CMD_NEW_WIPHY:
|
||||
if (!w) {
|
||||
r = wiphy_new(manager, message, &w);
|
||||
if (r < 0) {
|
||||
@@ -432,11 +431,10 @@ int manager_genl_process_nl80211_wiphy(sd_netlink *genl, sd_netlink_message *mes
|
||||
log_wiphy_warning_errno(w, r, "Failed to update wiphy, ignoring: %m");
|
||||
|
||||
break;
|
||||
}
|
||||
case NL80211_CMD_DEL_WIPHY:
|
||||
|
||||
case NL80211_CMD_DEL_WIPHY:
|
||||
if (!w) {
|
||||
log_debug("The kernel removes wiphy we do not know, ignoring: %m");
|
||||
log_debug("The kernel removed wiphy we do not know, ignoring.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -445,7 +443,7 @@ int manager_genl_process_nl80211_wiphy(sd_netlink *genl, sd_netlink_message *mes
|
||||
break;
|
||||
|
||||
default:
|
||||
log_wiphy_debug(w, "nl80211: received %s(%u) message.",
|
||||
log_wiphy_debug(w, "nl80211: received %s(%u) message, ignoring.",
|
||||
strna(nl80211_cmd_to_string(cmd)), cmd);
|
||||
}
|
||||
|
||||
|
||||
@@ -844,7 +844,7 @@ int image_find(RuntimeScope scope,
|
||||
continue;
|
||||
}
|
||||
if (!result.path) {
|
||||
log_debug("Found versioned directory '%s', without matching entry, skipping: %m", vp);
|
||||
log_debug("Found versioned directory '%s', without matching entry, skipping.", vp);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1052,7 +1052,7 @@ int image_discover(
|
||||
continue;
|
||||
}
|
||||
if (!result.path) {
|
||||
log_debug("Found versioned directory '%s', without matching entry, skipping: %m", vp);
|
||||
log_debug("Found versioned directory '%s', without matching entry, skipping.", vp);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ static int on_child_notify(sd_event_source *s, int fd, uint32_t revents, void *u
|
||||
return 0;
|
||||
}
|
||||
if (error <= 0) {
|
||||
log_debug("Received non-positive ERRNO= notification message, ignoring: %m");
|
||||
log_debug("Received non-positive ERRNO= notification message, ignoring: %d", error);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -917,7 +917,7 @@ static int link_apply_sr_iov_config(Link *link) {
|
||||
return 0;
|
||||
}
|
||||
if (n == 0) {
|
||||
log_link_warning(link, "No SR-IOV virtual function exists, ignoring all [SR-IOV] sections: %m");
|
||||
log_link_warning(link, "No SR-IOV virtual functions exist, ignoring all [SR-IOV] sections.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user