summaryrefslogtreecommitdiff
path: root/src/notify.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-08-31 21:05:54 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-31 21:05:54 +0200
commit22f4096ca96acd504ac74e7dfad96f07edb6da51 (patch)
treeebe2bb84f85e0abd8abb508fa91e2c3165bc4ce4 /src/notify.c
parentf73e33d9ecdd5f97f31a3efcca254519eef5b7ea (diff)
systemctl: rework exit codes for all utility programs to follow LSB or other standards
Diffstat (limited to 'src/notify.c')
-rw-r--r--src/notify.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/notify.c b/src/notify.c
index 1c18c6bc08..28cfe23b23 100644
--- a/src/notify.c
+++ b/src/notify.c
@@ -131,13 +131,13 @@ int main(int argc, char* argv[]) {
char* our_env[4], **final_env = NULL;
unsigned i = 0;
char *status = NULL, *cpid = NULL, *n = NULL;
- int r, retval = 1;
+ int r, retval = EXIT_FAILURE;
log_parse_environment();
log_open();
if ((r = parse_argv(argc, argv)) <= 0) {
- retval = r < 0;
+ retval = r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
goto finish;
}
@@ -173,7 +173,7 @@ int main(int argc, char* argv[]) {
}
if (strv_length(final_env) <= 0) {
- retval = 0;
+ retval = EXIT_SUCCESS;
goto finish;
}
@@ -187,7 +187,7 @@ int main(int argc, char* argv[]) {
goto finish;
}
- retval = r <= 0;
+ retval = r <= 0 ? EXIT_FAILURE : EXIT_SUCCESS;
finish:
free(status);