]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: fix log messages using %m without an errno
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 18 Nov 2025 07:56:04 +0000 (08:56 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 18 Nov 2025 11:27:59 +0000 (12:27 +0100)
src/home/homed-home.c
src/network/networkd-ipv4ll.c
src/network/networkd-nexthop.c
src/network/networkd-wifi.c
src/network/networkd-wiphy.c
src/shared/discover-image.c
src/shared/fork-notify.c
src/udev/net/link-config.c

index e4f3487473a3ce5b8a9b9f76e802a979e2c8a348..56eb30d08e63f573b76136112648d31fdc89f405 100644 (file)
@@ -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);
                 }
index 94fa25a4f07408c8aa3bf4f0e3769405912d9844..23b9e80796bdda649c33bcd894b5dd06d253c8fb 100644 (file)
@@ -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;
                         }
index 7d221849b479c8ff735a4e5fc773be6b62102ea3..5e5f0d0e6858be618be4e15e76e3ea4613ef83a7 100644 (file)
@@ -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;
         }
 
index e0b4f8b50683424662437a62d2b2c107dc192c84..3caacef08921fbc4e95335c86556aa662b335409 100644 (file)
@@ -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.");
index 5b29c5ca5c5e94be53c3897de60552d9257548a2..1dde69a43b44db0175374b14704a7236f7e1b285 100644 (file)
@@ -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);
         }
 
index 52e1036a6b1983b628d3ae1dcb37e7a8517d49a7..3ed9958d72f1639b57d1721cabceb0d532ea8140 100644 (file)
@@ -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;
                                         }
 
index b80dc846ee38f759ec5504a9c862258c352a3225..624ddab8d15973fee932a86e9860e1f4cc9c60bf 100644 (file)
@@ -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;
                 }
 
index d1404fed8b104a5a73152180a5b1e3b1dd181fc3..70971ca2f56b913aa3a5262198eebb152ede2777 100644 (file)
@@ -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;
         }