fs-util: make symlink_idempotent() optionally create relative link

This commit is contained in:
Yu Watanabe
2018-09-24 18:52:53 +03:00
committed by Lennart Poettering
parent bee13f2e49
commit 6c9c51e5e2
5 changed files with 23 additions and 18 deletions
+2 -2
View File
@@ -373,7 +373,7 @@ static int mount_legacy_cgns_supported(
if (!target)
return log_oom();
r = symlink_idempotent(controller, target);
r = symlink_idempotent(controller, target, false);
if (r == -EINVAL)
return log_error_errno(r, "Invalid existing symlink for combined hierarchy: %m");
if (r < 0)
@@ -482,7 +482,7 @@ static int mount_legacy_cgns_unsupported(
if (r < 0)
return r;
r = symlink_idempotent(combined, target);
r = symlink_idempotent(combined, target, false);
if (r == -EINVAL)
return log_error_errno(r, "Invalid existing symlink for combined hierarchy: %m");
if (r < 0)