summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-10-10 21:48:08 +0200
committerLennart Poettering <lennart@poettering.net>2016-10-10 21:48:08 +0200
commit41e2036eb83204df95a1c3e829bcfd78ee17aaa3 (patch)
tree6fbf6af9415b879c9b0e9989e181ca84b0af8d8a /src/basic
parent3b8769bda8c79283ea89686a16e6cff2e9a6f495 (diff)
exit-status: kill is_clean_exit_lsb(), move logic to sysv-generator
Let's get rid of is_clean_exit_lsb(), let's move the logic for the special handling of the two LSB exit codes into the sysv-generator by writing out appropriate SuccessExitStatus= lines if the LSB header exists. This is not only semantically more correct, bug also fixes a bug as the code in service.c that chose between is_clean_exit_lsb() and is_clean_exit() based this check on whether a native unit files was available for the unit. However, that check was bogus since a long time, since the SysV generator was introduced and native SysV script support was removed from PID 1, as in that case a unit file always existed.
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/exit-status.c10
-rw-r--r--src/basic/exit-status.h1
2 files changed, 0 insertions, 11 deletions
diff --git a/src/basic/exit-status.c b/src/basic/exit-status.c
index 81c2c6675c..96d4619da6 100644
--- a/src/basic/exit-status.c
+++ b/src/basic/exit-status.c
@@ -194,16 +194,6 @@ bool is_clean_exit(int code, int status, ExitStatusSet *success_status) {
return false;
}
-bool is_clean_exit_lsb(int code, int status, ExitStatusSet *success_status) {
-
- if (is_clean_exit(code, status, success_status))
- return true;
-
- return
- code == CLD_EXITED &&
- IN_SET(status, EXIT_NOTINSTALLED, EXIT_NOTCONFIGURED);
-}
-
void exit_status_set_free(ExitStatusSet *x) {
assert(x);
diff --git a/src/basic/exit-status.h b/src/basic/exit-status.h
index 46cc905865..b3baa50cf4 100644
--- a/src/basic/exit-status.h
+++ b/src/basic/exit-status.h
@@ -99,7 +99,6 @@ typedef struct ExitStatusSet {
const char* exit_status_to_string(int status, ExitStatusLevel level) _const_;
bool is_clean_exit(int code, int status, ExitStatusSet *success_status);
-bool is_clean_exit_lsb(int code, int status, ExitStatusSet *success_status);
void exit_status_set_free(ExitStatusSet *x);
bool exit_status_set_is_empty(ExitStatusSet *x);