[systemd-devel] [PATCH] Fix hostnamectl exit code
Martin Pitt
martin.pitt at ubuntu.com
Fri Nov 28 06:54:42 PST 2014
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.
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-hostnamectl-Exit-with-zero-on-success.patch
Type: text/x-diff
Size: 917 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141128/06c40db6/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141128/06c40db6/attachment.sig>
More information about the systemd-devel
mailing list