diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-08-31 21:05:54 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-08-31 21:05:54 +0200 |
commit | 22f4096ca96acd504ac74e7dfad96f07edb6da51 (patch) | |
tree | ebe2bb84f85e0abd8abb508fa91e2c3165bc4ce4 /src/kmsg-syslogd.c | |
parent | f73e33d9ecdd5f97f31a3efcca254519eef5b7ea (diff) |
systemctl: rework exit codes for all utility programs to follow LSB or other standards
Diffstat (limited to 'src/kmsg-syslogd.c')
-rw-r--r-- | src/kmsg-syslogd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/kmsg-syslogd.c b/src/kmsg-syslogd.c index f5c8e7121d..2bdbb4b9f3 100644 --- a/src/kmsg-syslogd.c +++ b/src/kmsg-syslogd.c @@ -473,16 +473,16 @@ static int process_event(Server *s, struct epoll_event *ev) { int main(int argc, char *argv[]) { Server server; - int r = 3, n; + int r = EXIT_FAILURE, n; if (getppid() != 1) { log_error("This program should be invoked by init only."); - return 1; + return EXIT_FAILURE; } if (argc > 1) { log_error("This program does not take arguments."); - return 1; + return EXIT_FAILURE; } log_set_target(LOG_TARGET_KMSG); @@ -491,16 +491,16 @@ int main(int argc, char *argv[]) { if ((n = sd_listen_fds(true)) < 0) { log_error("Failed to read listening file descriptors from environment: %s", strerror(-r)); - return 1; + return EXIT_FAILURE; } if (n <= 0 || n > SERVER_FD_MAX) { log_error("No or too many file descriptors passed."); - return 2; + return EXIT_FAILURE; } if (server_init(&server, (unsigned) n) < 0) - return 3; + return EXIT_FAILURE; log_debug("systemd-kmsg-syslogd running as pid %lu", (unsigned long) getpid()); @@ -531,7 +531,7 @@ int main(int argc, char *argv[]) { break; } - r = 0; + r = EXIT_SUCCESS; log_debug("systemd-kmsg-syslogd stopped as pid %lu", (unsigned long) getpid()); |