mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
shared/install: correctly report changes in install_info_symlink_alias()
Follow-up for b2751cf0394d36c24590b5f7b33e9f864b57ba0d Also make the conditions consistent for install_info_symlink_wants(). Fixes #33411 (cherry picked from commit 4441cf330b3847d6c553fb230e8e4c86aa75ebb9)
This commit is contained in:
parent
bb83650f96
commit
a42db16a1c
@ -1989,7 +1989,9 @@ static int install_info_symlink_alias(
|
||||
}
|
||||
broken = r == 0; /* symlink target does not exist? */
|
||||
|
||||
RET_GATHER(ret, create_symlink(lp, alias_target ?: info->path, alias_path, force || broken, changes, n_changes));
|
||||
r = create_symlink(lp, alias_target ?: info->path, alias_path, force || broken, changes, n_changes);
|
||||
if (r != 0 && ret >= 0)
|
||||
ret = r;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@ -2083,7 +2085,7 @@ static int install_info_symlink_wants(
|
||||
return -ENOMEM;
|
||||
|
||||
q = create_symlink(lp, info->path, path, /* force = */ true, changes, n_changes);
|
||||
if ((q < 0 && r >= 0) || r == 0)
|
||||
if (q != 0 && r >= 0)
|
||||
r = q;
|
||||
|
||||
if (unit_file_exists(scope, lp, dst) == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user