Merge pull request #13219 from poettering/named-exit-codes-tweaks
quick follow-up for the symbolic exit status PR #13207
This commit is contained in:
@@ -26,8 +26,8 @@ const ExitStatusMapping exit_status_mappings[256] = {
|
||||
* │ signal or such, and we follow that logic here.)
|
||||
*/
|
||||
|
||||
[EXIT_SUCCESS] = { "SUCCESS", EXIT_STATUS_GLIBC },
|
||||
[EXIT_FAILURE] = { "FAILURE", EXIT_STATUS_GLIBC },
|
||||
[EXIT_SUCCESS] = { "SUCCESS", EXIT_STATUS_LIBC },
|
||||
[EXIT_FAILURE] = { "FAILURE", EXIT_STATUS_LIBC },
|
||||
|
||||
[EXIT_CHDIR] = { "CHDIR", EXIT_STATUS_SYSTEMD },
|
||||
[EXIT_NICE] = { "NICE", EXIT_STATUS_SYSTEMD },
|
||||
@@ -107,8 +107,8 @@ const char* exit_status_class(int code) {
|
||||
return NULL;
|
||||
|
||||
switch (exit_status_mappings[code].class) {
|
||||
case EXIT_STATUS_GLIBC:
|
||||
return "glibc";
|
||||
case EXIT_STATUS_LIBC:
|
||||
return "libc";
|
||||
case EXIT_STATUS_SYSTEMD:
|
||||
return "systemd";
|
||||
case EXIT_STATUS_LSB:
|
||||
|
||||
@@ -75,11 +75,11 @@ enum {
|
||||
};
|
||||
|
||||
typedef enum ExitStatusClass {
|
||||
EXIT_STATUS_GLIBC = 1 << 0, /* libc EXIT_STATUS/EXIT_FAILURE */
|
||||
EXIT_STATUS_LIBC = 1 << 0, /* libc EXIT_STATUS/EXIT_FAILURE */
|
||||
EXIT_STATUS_SYSTEMD = 1 << 1, /* systemd's own exit codes */
|
||||
EXIT_STATUS_LSB = 1 << 2, /* LSB exit codes */
|
||||
EXIT_STATUS_BSD = 1 << 3, /* BSD (EX_xyz) exit codes */
|
||||
EXIT_STATUS_FULL = EXIT_STATUS_GLIBC | EXIT_STATUS_SYSTEMD | EXIT_STATUS_LSB | EXIT_STATUS_BSD,
|
||||
EXIT_STATUS_FULL = EXIT_STATUS_LIBC | EXIT_STATUS_SYSTEMD | EXIT_STATUS_LSB | EXIT_STATUS_BSD,
|
||||
} ExitStatusClass;
|
||||
|
||||
typedef struct ExitStatusSet {
|
||||
|
||||
Reference in New Issue
Block a user