shared/install: print name of offending file in error

"Unit type slice cannot be templated."
↓
"/etc/systemd/system.control/user@.slice: unit type slice cannot be templated."
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-05-04 19:45:19 +02:00
parent babccf14ce
commit bce84e10f8
1 changed files with 1 additions and 1 deletions

View File

@ -1226,7 +1226,7 @@ static int unit_file_load(
return -EINVAL;
if (unit_name_is_valid(info->name, UNIT_NAME_TEMPLATE|UNIT_NAME_INSTANCE) && !unit_type_may_template(type))
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Unit type %s cannot be templated.", unit_type_to_string(type));
"%s: unit type %s cannot be templated, ignoring.", path, unit_type_to_string(type));
if (!(flags & SEARCH_LOAD)) {
r = lstat(path, &st);