]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: fix check for template units
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Mon, 11 May 2015 21:52:29 +0000 (23:52 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Mon, 11 May 2015 22:26:14 +0000 (00:26 +0200)
A typo from 7410616c. We want to ignore EINVAL but only catch errors.

src/systemctl/systemctl.c

index d48160e0082962de9f4f02217eb1b217daadcacb..1f18f9cb0bbbf07021a6d345e8ea4616d3826371 100644 (file)
@@ -2339,7 +2339,7 @@ static int unit_find_paths(
                         _cleanup_free_ char *template = NULL;
 
                         r = unit_name_template(unit_name, &template);
-                        if (r != -EINVAL)
+                        if (r < 0 && r != -EINVAL)
                                 return log_error_errno(r, "Failed to determine template name: %m");
                         if (r >= 0) {
                                 r = unit_file_find_path(lp, template, &path);