systemctl: fix check for template units

A typo from 7410616c. We want to ignore EINVAL but only catch errors.
This commit is contained in:
Thomas Hindoe Paaboel Andersen 2015-05-11 23:52:29 +02:00
parent 0a98c46d50
commit eacd853425
1 changed files with 1 additions and 1 deletions

View 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);