summaryrefslogtreecommitdiff
path: root/src/main.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/main.c
parentf73e33d9ecdd5f97f31a3efcca254519eef5b7ea (diff)
systemctl: rework exit codes for all utility programs to follow LSB or other standards
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 53a455b505..2e6ccfaa30 100644
--- a/src/main.c
+++ b/src/main.c
@@ -876,7 +876,7 @@ fail:
int main(int argc, char *argv[]) {
Manager *m = NULL;
- int r, retval = 1;
+ int r, retval = EXIT_FAILURE;
FDSet *fds = NULL;
bool reexecute = false;
@@ -937,10 +937,10 @@ int main(int argc, char *argv[]) {
goto finish;
} else if (arg_action == ACTION_DUMP_CONFIGURATION_ITEMS) {
unit_dump_config_items(stdout);
- retval = 0;
+ retval = EXIT_SUCCESS;
goto finish;
} else if (arg_action == ACTION_DONE) {
- retval = 0;
+ retval = EXIT_SUCCESS;
goto finish;
}
@@ -1072,7 +1072,7 @@ int main(int argc, char *argv[]) {
if (arg_action == ACTION_TEST) {
printf("-> By jobs:\n");
manager_dump_jobs(m, stdout, "\t");
- retval = 0;
+ retval = EXIT_SUCCESS;
goto finish;
}
}
@@ -1086,7 +1086,7 @@ int main(int argc, char *argv[]) {
switch (m->exit_code) {
case MANAGER_EXIT:
- retval = 0;
+ retval = EXIT_SUCCESS;
log_debug("Exit.");
goto finish;