]> git.ipfire.org Git - thirdparty/systemd.git/commit
systemctl: clean up start_unit_one() error handling 10391/head
authorLennart Poettering <lennart@poettering.net>
Sat, 13 Oct 2018 12:38:46 +0000 (14:38 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 13 Oct 2018 12:38:46 +0000 (14:38 +0200)
commit0e8d9c0c4d7e71487c486f626c59853cfb031d16
treed1e9e31b134a9ca6a52dfef0b1fa3529033483a3
parent8b7ec7bbfad40308848cfda8499f34a16449fc08
systemctl: clean up start_unit_one() error handling

Let's split exit code handling in two: "r" is only used for errno-style
errors, and "ret" is used for exit() codes. Then, let's use EXIT_SUCCESS
for checking whether the latter is already used.

This way it should always be clear what kind of error we are processing,
and when we propaate one into the other.

Moreover this allows us to drop "q" form all inner loops, avoiding
confusion when to use "q" and when "r" to store received errors.

Fixes: #9704
src/systemctl/systemctl.c