]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-bus: do not log in higher than LOG_DEBUG from library
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 28 Jan 2026 01:48:10 +0000 (10:48 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 3 Feb 2026 07:49:46 +0000 (16:49 +0900)
Follow-up for 6c8de404c98fb9b965cba68360c2db1e3f55b776.

This also adds full stop to the log message, and make "vs" followed by
dot for consistency to other messages.

src/libsystemd/sd-bus/bus-message.c

index 69975c53711944a850240991dc0eb974c4f61373..c300d511ab1c38fb281af00b2a3bf4376a360403 100644 (file)
@@ -4206,21 +4206,21 @@ static int message_parse_fields(sd_bus_message *m, bool got_ctrunc) {
          * we also accept fewer fds than declared. Any attempt to actually use a truncated fd will fail later
          * when sd_bus_message_read_basic() finds the fd index out of range. Too many fds is always wrong. */
         if (m->n_fds > n_unix_fds_declared)
-                return log_error_errno(SYNTHETIC_ERRNO(EBADMSG),
-                                       "Received a bus message with too many fds: %" PRIu32 " received vs. %" PRIu32 " declared",
+                return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG),
+                                       "Received a bus message with too many fds: %" PRIu32 " received vs. %" PRIu32 " declared.",
                                        m->n_fds, n_unix_fds_declared);
 
         if (m->n_fds < n_unix_fds_declared) {
                 if (!got_ctrunc)
-                        return log_error_errno(SYNTHETIC_ERRNO(EBADMSG),
-                                               "Received a bus message with too few fds: %" PRIu32 " received vs. %" PRIu32 " declared",
+                        return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG),
+                                               "Received a bus message with too few fds: %" PRIu32 " received vs. %" PRIu32 " declared.",
                                                m->n_fds, n_unix_fds_declared);
 
-                log_error("Received a bus message with MSG_CTRUNC set with %" PRIu32 " fds received vs %" PRIu32 " declared",
+                log_debug("Received a bus message with MSG_CTRUNC set with %" PRIu32 " fds received vs. %" PRIu32 " declared.",
                           m->n_fds, n_unix_fds_declared);
 
         } else if (got_ctrunc)
-                return log_error_errno(SYNTHETIC_ERRNO(EBADMSG),
+                return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG),
                                        "Received a bus message with truncated control data, refusing.");
 
         switch (m->header->type) {