]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: reduce quoting in warning message
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 7 Nov 2024 14:45:24 +0000 (15:45 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 20 Dec 2024 19:43:57 +0000 (19:43 +0000)
We printed:
systemd-tmpfiles[705]: /usr/lib/tmpfiles.d/20-systemd-shell-extra.conf:10: Unknown modifiers in command 'L$'.
systemd-tmpfiles[705]: /usr/lib/tmpfiles.d/systemd-network.conf:10: Unknown modifiers in command 'd$'.
systemd-tmpfiles[705]: /usr/lib/tmpfiles.d/systemd-network.conf:11: Unknown modifiers in command 'd$'.
...

There's a lot of additional characters here make the message harder to parse. We know
that the command is a word without any whitespace, so quoting isn't really necessary.

Change this to:
... unknown modifiers in command: L$

(cherry picked from commit 390bab53923eea822ac525d0e4aa4b7f86d8cd92)
(cherry picked from commit 3efa9e717f047bc4e51f6b1130468bdd6e004fdc)

src/tmpfiles/tmpfiles.c

index 0cacae84e7b74228e2f21b514b93ee25863278fe..c9ed7b8ca51d2f40229f87b4f760d882e73387a2 100644 (file)
@@ -3683,7 +3683,7 @@ static int parse_line(
                 else {
                         *invalid_config = true;
                         return log_syntax(NULL, LOG_ERR, fname, line, SYNTHETIC_ERRNO(EBADMSG),
-                                          "Unknown modifiers in command '%s'.", action);
+                                          "Unknown modifiers in command: %s", action);
                 }
 
         if (boot && !arg_boot) {