chiark / gitweb /
basic/path-util: fix ordering in error message
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 11 Jun 2018 12:37:36 +0000 (14:37 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
Jun 11 14:29:12 krowka systemd[1]: /etc/systemd/system/workingdir.service:6: = path is not normalizedWorkingDirectory: /../../etc
   ↓
Jun 11 14:32:12 krowka systemd[1]: /etc/systemd/system/workingdir.service:6: WorkingDirectory= path is not normalized: /../../etc

src/basic/path-util.c

index d7862f1398789d3108f6f4f4bf3aa5341ba3c45d..422543140dcd14c4e74666df4a02652ce2ad4782 100644 (file)
@@ -1024,14 +1024,14 @@ int path_simplify_and_warn(
                 if (!absolute && (flag & PATH_CHECK_ABSOLUTE)) {
                         log_syntax(unit, LOG_ERR, filename, line, 0,
                                    "%s= path is not absolute%s: %s",
-                                   fatal ? "" : ", ignoring", lvalue, path);
+                                   lvalue, fatal ? "" : ", ignoring", path);
                         return -EINVAL;
                 }
 
                 if (absolute && (flag & PATH_CHECK_RELATIVE)) {
                         log_syntax(unit, LOG_ERR, filename, line, 0,
                                    "%s= path is absolute%s: %s",
-                                   fatal ? "" : ", ignoring", lvalue, path);
+                                   lvalue, fatal ? "" : ", ignoring", path);
                         return -EINVAL;
                 }
         }
@@ -1041,7 +1041,7 @@ int path_simplify_and_warn(
         if (!path_is_normalized(path)) {
                 log_syntax(unit, LOG_ERR, filename, line, 0,
                            "%s= path is not normalized%s: %s",
-                           fatal ? "" : ", ignoring", lvalue, path);
+                           lvalue, fatal ? "" : ", ignoring", path);
                 return -EINVAL;
         }