int install_name_printf(
UnitFileScope scope,
- const UnitFileInstallInfo *i,
+ const UnitFileInstallInfo *info,
const char *format,
- const char *root,
char **ret) {
/* This is similar to unit_name_printf() */
{}
};
- assert(i);
+ assert(info);
assert(format);
assert(ret);
- return specifier_printf(format, UNIT_NAME_MAX, table, root, i, ret);
+ return specifier_printf(format, UNIT_NAME_MAX, table, info->root, info, ret);
}
if (r == 0)
break;
- r = install_name_printf(ctx->scope, info, word, info->root, &printed);
+ r = install_name_printf(ctx->scope, info, word, &printed);
if (r < 0)
return log_syntax(unit, LOG_WARNING, filename, line, r,
"Failed to resolve unit name in Also=\"%s\": %m", word);
return log_syntax(unit, LOG_WARNING, filename, line, 0,
"DefaultInstance= only makes sense for template units, ignoring.");
- r = install_name_printf(ctx->scope, info, rvalue, info->root, &printed);
+ r = install_name_printf(ctx->scope, info, rvalue, &printed);
if (r < 0)
return log_syntax(unit, LOG_WARNING, filename, line, r,
"Failed to resolve instance name in DefaultInstance=\"%s\": %m", rvalue);
STRV_FOREACH(s, info->aliases) {
_cleanup_free_ char *alias_path = NULL, *dst = NULL, *dst_updated = NULL;
- q = install_name_printf(scope, info, *s, info->root, &dst);
+ q = install_name_printf(scope, info, *s, &dst);
if (q < 0) {
unit_file_changes_add(changes, n_changes, q, *s, NULL);
r = r < 0 ? r : q;
STRV_FOREACH(s, list) {
_cleanup_free_ char *dst = NULL;
- q = install_name_printf(scope, info, *s, info->root, &dst);
+ q = install_name_printf(scope, info, *s, &dst);
if (q < 0) {
unit_file_changes_add(changes, n_changes, q, *s, NULL);
return q;
_cleanup_free_ char *t = NULL, \
*d1 = ASSERT_PTR(strdup(i.name)), \
*d2 = ASSERT_PTR(strdup(i.path)); \
- int r = install_name_printf(scope, &src, pattern, NULL, &t); \
+ int r = install_name_printf(scope, &src, pattern, &t); \
assert_se(result ? r >= 0 : r < 0); \
memzero(i.name, strlen(i.name)); \
memzero(i.path, strlen(i.path)); \