const char *filename,
unsigned line,
const char *section,
+ unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
const char *filename,
unsigned line,
const char *section,
+ unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
UnitFileScope scope,
const char *root_dir,
const char *file,
+ bool force,
UnitFileChange **changes,
unsigned *n_changes) {
path = strappenda(config_path, "/" SPECIAL_DEFAULT_TARGET);
- r = create_symlink(i->path, path, true, changes, n_changes);
+ r = create_symlink(i->path, path, force, changes, n_changes);
if (r < 0)
return r;
r = readlink_malloc(path, &tmp);
if (r == -ENOENT)
continue;
- if (r < 0)
+ else if (r == -EINVAL)
+ /* not a symlink */
+ n = strdup(SPECIAL_DEFAULT_TARGET);
+ else if (r < 0)
return r;
+ else
+ n = strdup(path_get_file_name(tmp));
- n = strdup(path_get_file_name(tmp));
if (!n)
return -ENOMEM;