]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: use log_syntax() for complaining about configuration file errors
authorLennart Poettering <lennart@poettering.net>
Wed, 10 Jul 2019 11:00:44 +0000 (13:00 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 10 Jul 2019 14:20:08 +0000 (16:20 +0200)
In the light of #12926 I needed some log messages for testing. This
tmpfiles one came to mind, since it's frequently seen on typical Fedora
systems. Alas, they didn't actually use log_syntax, and thus weren't
recognizable by the new config file urlifaction code. Let's fix that.

src/tmpfiles/tmpfiles.c

index b8ee856a1593414793d57622e564d4d72cb1c6d0..ef817fca4f7024157003c39b7e17d403ad72573d 100644 (file)
@@ -2478,8 +2478,7 @@ static int patch_var_run(const char *fname, unsigned line, char **path) {
         /* Also log about this briefly. We do so at LOG_NOTICE level, as we fixed up the situation automatically, hence
          * there's no immediate need for action by the user. However, in the interest of making things less confusing
          * to the user, let's still inform the user that these snippets should really be updated. */
-
-        log_notice("[%s:%u] Line references path below legacy directory /var/run/, updating %s → %s; please update the tmpfiles.d/ drop-in file accordingly.", fname, line, *path, n);
+        log_syntax(NULL, LOG_NOTICE, fname, line, 0, "Line references path below legacy directory /var/run/, updating %s → %s; please update the tmpfiles.d/ drop-in file accordingly.", *path, n);
 
         free_and_replace(*path, n);