summaryrefslogtreecommitdiff
path: root/src/basic/exit-status.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-10-10 20:08:41 +0200
committerLennart Poettering <lennart@poettering.net>2016-10-10 20:08:41 +0200
commit65e3fd83c98a44111c1b05a6e0d492dcab58853b (patch)
treeb390312dc48bc763d6303caa13e06f33018df973 /src/basic/exit-status.h
parent642d6665f431c246e466703cdd4f32814603b579 (diff)
exit-status: remove ExitStatus typedef
Do not make up our own type for ExitStatus, but use the type used by POSIX for this, which is "int". In particular as we never used that type outside of the definition of exit_status_to_string() where we internally cast the paramter to (int) every single time we used it. Hence, let's simplify things, drop the type and use the kernel type directly.
Diffstat (limited to 'src/basic/exit-status.h')
-rw-r--r--src/basic/exit-status.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/exit-status.h b/src/basic/exit-status.h
index 2309f68815..46cc905865 100644
--- a/src/basic/exit-status.h
+++ b/src/basic/exit-status.h
@@ -31,7 +31,7 @@
* https://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
*/
-typedef enum ExitStatus {
+enum {
/* EXIT_SUCCESS defined by libc */
/* EXIT_FAILURE defined by libc */
EXIT_INVALIDARGUMENT = 2,
@@ -82,7 +82,7 @@ typedef enum ExitStatus {
EXIT_MAKE_STARTER,
EXIT_CHOWN,
EXIT_SMACK_PROCESS_LABEL,
-} ExitStatus;
+};
typedef enum ExitStatusLevel {
EXIT_STATUS_MINIMAL, /* only cover libc EXIT_STATUS/EXIT_FAILURE */
@@ -96,7 +96,7 @@ typedef struct ExitStatusSet {
Set *signal;
} ExitStatusSet;
-const char* exit_status_to_string(ExitStatus status, ExitStatusLevel level) _const_;
+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);