1
0
mirror of https://github.com/systemd/systemd synced 2024-07-01 07:34:28 +00:00

install: shorten code a bit

This changes behaviour a bit, since we now keep track of OOM errors in
install_changes_add(). Which I'd argue is a good thing.
This commit is contained in:
Lennart Poettering 2024-06-18 17:09:34 +02:00
parent 422f80d59b
commit 64d61d1918

View File

@ -2454,10 +2454,8 @@ int unit_file_unmask(
return -ENOMEM;
if (!dry_run && unlink(path) < 0) {
if (errno != ENOENT) {
RET_GATHER(r, -errno);
install_changes_add(changes, n_changes, -errno, path, NULL);
}
if (errno != ENOENT)
RET_GATHER(r, install_changes_add(changes, n_changes, -errno, path, NULL));
continue;
}