[systemd-devel] [PATCH] Fix hostnamectl exit code
David Herrmann
dh.herrmann at gmail.com
Fri Nov 28 08:16:15 PST 2014
Hi
On Fri, Nov 28, 2014 at 3:54 PM, Martin Pitt <martin.pitt at ubuntu.com> wrote:
> Hey David,
>
> David Herrmann [2014-11-28 15:49 +0100]:
>> Why not fix all those other occurrences with one fix by changing
>> hostnamectl_main() the last line from:
>> return r < 0 ? EXIT_FAILURE : r;
>> to
>> return r < 0 ? EXIT_FAILURE : 0;
>>
>> Usually, >=0 means success, <0 failure, in systemd. We should not
>> return !=0 from main() if the return value wasn't negative.
>
> Yeah, that's even more robust and guards against similar errors in the
> future. Updated patch attached.
Looks good, pushed!
Thanks
David
More information about the systemd-devel
mailing list