From: Lennart Poettering Date: Wed, 11 Nov 2015 11:57:40 +0000 (+0100) Subject: systemctl: add a comment that clarifies why we do "return r" at the end of main() X-Git-Tag: v228~55^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=404f08d341c6fcd5f28664902adefd069f2082cd;p=thirdparty%2Fsystemd.git systemctl: add a comment that clarifies why we do "return r" at the end of main() To avoid confusion as outlined in #1845. --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 0c42766a60c..616ede814c5 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -7709,5 +7709,7 @@ finish: release_busses(); + /* Note that we return r here, not EXIT_SUCCESS, so that we can implement the LSB-like return codes */ + return r < 0 ? EXIT_FAILURE : r; }