core: use unit_full_printf() at a couple of locations we used unit_name_printf() before

For settings that are not taking unit names there's no reason to use
unit_name_printf(). Use unit_full_printf() instead, as the names are validated
anyway in one form or another after expansion.
This commit is contained in:
Lennart Poettering
2016-12-05 19:25:44 +01:00
parent b1801e6433
commit 18913df9a2

View File

@@ -1336,7 +1336,7 @@ int config_parse_exec_selinux_context(
} else
ignore = false;
r = unit_name_printf(u, rvalue, &k);
r = unit_full_printf(u, rvalue, &k);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers, ignoring: %m");
return 0;
@@ -1384,7 +1384,7 @@ int config_parse_exec_apparmor_profile(
} else
ignore = false;
r = unit_name_printf(u, rvalue, &k);
r = unit_full_printf(u, rvalue, &k);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers, ignoring: %m");
return 0;
@@ -1432,7 +1432,7 @@ int config_parse_exec_smack_process_label(
} else
ignore = false;
r = unit_name_printf(u, rvalue, &k);
r = unit_full_printf(u, rvalue, &k);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers, ignoring: %m");
return 0;
@@ -1699,7 +1699,7 @@ int config_parse_fdname(
return 0;
}
r = unit_name_printf(UNIT(s), rvalue, &p);
r = unit_full_printf(UNIT(s), rvalue, &p);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r, "Failed to resolve specifiers, ignoring: %s", rvalue);
return 0;
@@ -3720,7 +3720,7 @@ int config_parse_runtime_directory(
return 0;
}
r = unit_name_printf(u, word, &k);
r = unit_full_printf(u, word, &k);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, r,
"Failed to resolve specifiers in \"%s\", ignoring: %m", word);