]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/socket: shorten/reword message about restarted sockets
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Jul 2025 08:25:59 +0000 (10:25 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Jul 2025 08:29:23 +0000 (10:29 +0200)
log_unit_warning() already prints the full unit name, so we don't need to say
that it is a socket unit. And in technical messages articles like "the" are
generally skipped to make the messages shorter. Use simpler tense and simpler
wording.

Example from log: fedora.local systemd[1]: systemd-initctl.socket: Socket unit
        configuration has changed while unit has been running, no open socket file
        descriptor left. The socket unit is not functional until restarted.
This is just too wordy and says "socket" four times.

src/core/socket.c

index f648721f0573eca76d0c60b790545bede1c35e5d..34f3e3ea4de917f77cb40cc0981b47f653e5484c 100644 (file)
@@ -1931,9 +1931,9 @@ static int socket_coldplug(Unit *u) {
                    SOCKET_RUNNING)) {
 
                 /* Originally, we used to simply reopen all sockets here that we didn't have file descriptors
-                 * for. However, this is problematic, as we won't traverse through the SOCKET_START_CHOWN state for
-                 * them, and thus the UID/GID wouldn't be right. Hence, instead simply check if we have all fds open,
-                 * and if there's a mismatch, warn loudly.
+                 * for. However, this is problematic, as we won't traverse through the SOCKET_START_CHOWN
+                 * state for them, and thus the UID/GID wouldn't be right. Hence, instead simply check if we
+                 * have all fds open, and if there's a mismatch, warn loudly.
                  *
                  * Note that SOCKET_START_OPEN requires no special treatment, as it's only intermediate
                  * between SOCKET_START_PRE and SOCKET_START_CHOWN and shall otherwise not be observed.
@@ -1942,14 +1942,14 @@ static int socket_coldplug(Unit *u) {
                 r = socket_check_open(s);
                 if (r == SOCKET_OPEN_NONE)
                         log_unit_warning(UNIT(s),
-                                         "Socket unit configuration has changed while unit has been running, "
-                                         "no open socket file descriptor left. "
-                                         "The socket unit is not functional until restarted.");
+                                         "Unit configuration changed while unit was running, "
+                                         "and no socket file descriptors are open. "
+                                         "Unit not functional until restarted.");
                 else if (r == SOCKET_OPEN_SOME)
                         log_unit_warning(UNIT(s),
-                                         "Socket unit configuration has changed while unit has been running, "
+                                         "Unit configuration changed while unit was running, "
                                          "and some socket file descriptors have not been opened yet. "
-                                         "The socket unit is not fully functional until restarted.");
+                                         "Unit not fully functional until restarted.");
         }
 
         if (s->deserialized_state == SOCKET_LISTENING) {