]> 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>
Thu, 19 Dec 2024 09:56:00 +0000 (09:56 +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)

src/tmpfiles/tmpfiles.c

index 86bf16356dc1b8872955bac8146f4cf5c21ff377..bff05cda6f05f8b98b820958529a960d8f83dc72 100644 (file)
@@ -3684,7 +3684,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) {