diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-07-29 19:18:56 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-07-29 19:22:22 +0200 |
commit | 5238d9a83a52c64e24856b0d3b2ca0b0ee52479a (patch) | |
tree | ee2df5003bfb4c1abacd99cfebe5b1e226f41abc /src/analyze | |
parent | 563067ad265f4704395165177fb5b83bc9628c66 (diff) | |
download | systemd-5238d9a83a52c64e24856b0d3b2ca0b0ee52479a.tar.gz |
analyze: rename "exit-codes" to "exit-status"
waitid(2) and the libc function signature calls this "exit status", and
uses "exit code" for something different. Let's stick to the same
nomenclature hence.
Diffstat (limited to 'src/analyze')
-rw-r--r-- | src/analyze/analyze.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index 199d49f5b9..1785e2ec07 100644 --- a/src/analyze/analyze.c +++ b/src/analyze/analyze.c @@ -1638,11 +1638,11 @@ static void dump_syscall_filter(const SyscallFilterSet *set) { printf(" %s%s%s\n", syscall[0] == '@' ? ansi_underline() : "", syscall, ansi_normal()); } -static int dump_exit_codes(int argc, char *argv[], void *userdata) { +static int dump_exit_status(int argc, char *argv[], void *userdata) { _cleanup_(table_unrefp) Table *table = NULL; int r; - table = table_new("name", "code", "class"); + table = table_new("name", "status", "class"); if (!table) return log_oom(); @@ -1660,17 +1660,17 @@ static int dump_exit_codes(int argc, char *argv[], void *userdata) { } else for (int i = 1; i < argc; i++) { - int code; + int status; - code = exit_status_from_string(argv[i]); - if (code < 0) - return log_error_errno(r, "Invalid exit code \"%s\": %m", argv[i]); + status = exit_status_from_string(argv[i]); + if (status < 0) + return log_error_errno(r, "Invalid exit status \"%s\": %m", argv[i]); - assert(code >= 0 && (size_t) code < ELEMENTSOF(exit_status_mappings)); + assert(status >= 0 && (size_t) status < ELEMENTSOF(exit_status_mappings)); r = table_add_many(table, - TABLE_STRING, exit_status_mappings[code].name ?: "-", - TABLE_INT, code, - TABLE_STRING, exit_status_class(code) ?: "-"); + TABLE_STRING, exit_status_mappings[status].name ?: "-", + TABLE_INT, status, + TABLE_STRING, exit_status_class(status) ?: "-"); if (r < 0) return r; } @@ -2213,7 +2213,7 @@ static int help(int argc, char *argv[], void *userdata) { " dump Output state serialization of service manager\n" " cat-config Show configuration file and drop-ins\n" " unit-paths List load directories for units\n" - " exit-codes List exit code definitions\n" + " exit-status List exit status definitions\n" " syscall-filter [NAME...] Print list of syscalls in seccomp filter\n" " condition CONDITION... Evaluate conditions and asserts\n" " verify FILE... Check unit files for correctness\n" @@ -2418,7 +2418,7 @@ static int run(int argc, char *argv[]) { { "dump", VERB_ANY, 1, 0, dump }, { "cat-config", 2, VERB_ANY, 0, cat_config }, { "unit-paths", 1, 1, 0, dump_unit_paths }, - { "exit-codes", VERB_ANY, VERB_ANY, 0, dump_exit_codes }, + { "exit-status", VERB_ANY, VERB_ANY, 0, dump_exit_status }, { "syscall-filter", VERB_ANY, VERB_ANY, 0, dump_syscall_filters }, { "condition", 2, VERB_ANY, 0, do_condition }, { "verify", 2, VERB_ANY, 0, do_verify }, |