diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-07-29 19:05:25 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-07-29 19:05:25 +0200 |
commit | e04ed6db6b44681b7a7876b9c4a1e6adaf877670 (patch) | |
tree | 092d3d785b252e74139db089c16bce42a2cd9b91 /src | |
parent | 1d7458fbb1b09ebbfdcf775909e09c56d6a6023e (diff) | |
download | systemd-e04ed6db6b44681b7a7876b9c4a1e6adaf877670.tar.gz |
exit-status: rename EXIT_STATUS_GLIBC → EXIT_STATUS_LIBC
After all these two exit codes are defined by ISO C as part of the C
library, and it's not the GNU implementation defines them.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/execute.c | 2 | ||||
-rw-r--r-- | src/core/main.c | 2 | ||||
-rw-r--r-- | src/shared/exit-status.c | 8 | ||||
-rw-r--r-- | src/shared/exit-status.h | 4 | ||||
-rw-r--r-- | src/systemctl/systemctl.c | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index 5b55557f4e..21127d4f70 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -3881,7 +3881,7 @@ int exec_spawn(Unit *unit, if (r < 0) { const char *status = exit_status_to_string(exit_status, - EXIT_STATUS_GLIBC | EXIT_STATUS_SYSTEMD); + EXIT_STATUS_LIBC | EXIT_STATUS_SYSTEMD); log_struct_errno(LOG_ERR, r, "MESSAGE_ID=" SD_MESSAGE_SPAWN_FAILED_STR, diff --git a/src/core/main.c b/src/core/main.c index 0698f893fd..bcce7178a8 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -223,7 +223,7 @@ _noreturn_ static void crash(int sig) { log_emergency_errno(r, "Caught <%s>, waitpid() failed: %m", signal_to_string(sig)); else if (status.si_code != CLD_DUMPED) { const char *s = status.si_code == CLD_EXITED - ? exit_status_to_string(status.si_status, EXIT_STATUS_GLIBC) + ? exit_status_to_string(status.si_status, EXIT_STATUS_LIBC) : signal_to_string(status.si_status); log_emergency("Caught <%s>, core dump failed (child "PID_FMT", code=%s, status=%i/%s).", diff --git a/src/shared/exit-status.c b/src/shared/exit-status.c index 80ac4868cb..44b1c9b749 100644 --- a/src/shared/exit-status.c +++ b/src/shared/exit-status.c @@ -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: diff --git a/src/shared/exit-status.h b/src/shared/exit-status.h index d6da8c19b9..9ea147c842 100644 --- a/src/shared/exit-status.h +++ b/src/shared/exit-status.h @@ -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 { diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 880a04411c..82babaa691 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -4380,7 +4380,7 @@ static void print_status_info( printf("status=%i", p->status); - c = exit_status_to_string(p->status, EXIT_STATUS_GLIBC | EXIT_STATUS_SYSTEMD); + c = exit_status_to_string(p->status, EXIT_STATUS_LIBC | EXIT_STATUS_SYSTEMD); if (c) printf("/%s", c); @@ -4422,7 +4422,7 @@ static void print_status_info( printf("status=%i", i->exit_status); c = exit_status_to_string(i->exit_status, - EXIT_STATUS_GLIBC | EXIT_STATUS_SYSTEMD); + EXIT_STATUS_LIBC | EXIT_STATUS_SYSTEMD); if (c) printf("/%s", c); |