diff options
author | 2018-12-03 21:39:12 +0100 | |
---|---|---|
committer | 2018-12-03 22:42:38 +0100 | |
commit | 9969b5427967dc7bcbd9a14ea4d6ae8133c5fec0 (patch) | |
tree | 34ce0d5aed14c4b0b6a168f0afb7950a244f606a | |
parent | format-table: add option to uppercase cells on display (diff) | |
download | systemd-9969b5427967dc7bcbd9a14ea4d6ae8133c5fec0.tar.gz systemd-9969b5427967dc7bcbd9a14ea4d6ae8133c5fec0.tar.bz2 systemd-9969b5427967dc7bcbd9a14ea4d6ae8133c5fec0.zip |
tree-wide: specify all table headers in lower-case
-rw-r--r-- | src/analyze/analyze-security.c | 4 | ||||
-rw-r--r-- | src/login/inhibit.c | 2 | ||||
-rw-r--r-- | src/login/loginctl.c | 6 | ||||
-rw-r--r-- | src/machine/machinectl.c | 4 | ||||
-rw-r--r-- | src/portable/portablectl.c | 2 | ||||
-rw-r--r-- | src/test/test-format-table.c | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/src/analyze/analyze-security.c b/src/analyze/analyze-security.c index 6402d4504..9f327d365 100644 --- a/src/analyze/analyze-security.c +++ b/src/analyze/analyze-security.c @@ -1393,7 +1393,7 @@ static int assess(const struct security_info *info, Table *overview_table, Analy int r; if (!FLAGS_SET(flags, ANALYZE_SECURITY_SHORT)) { - details_table = table_new("", "NAME", "DESCRIPTION", "WEIGHT", "BADNESS", "RANGE", "EXPOSURE"); + details_table = table_new(" ", "name", "description", "weight", "badness", "range", "exposure"); if (!details_table) return log_oom(); @@ -1967,7 +1967,7 @@ int analyze_security(sd_bus *bus, char **units, AnalyzeSecurityFlags flags) { assert(bus); if (strv_length(units) != 1) { - overview_table = table_new("UNIT", "EXPOSURE", "PREDICATE", "HAPPY"); + overview_table = table_new("unit", "exposure", "predicate", "happy"); if (!overview_table) return log_oom(); } diff --git a/src/login/inhibit.c b/src/login/inhibit.c index 2394c5d93..03bbf3b82 100644 --- a/src/login/inhibit.c +++ b/src/login/inhibit.c @@ -83,7 +83,7 @@ static int print_inhibitors(sd_bus *bus) { if (r < 0) return log_error_errno(r, "Could not get active inhibitors: %s", bus_error_message(&error, r)); - table = table_new("WHO", "UID", "USER", "PID", "COMM", "WHAT", "WHY", "MODE"); + table = table_new("who", "uid", "user", "pid", "comm", "what", "why", "mode"); if (!table) return log_oom(); diff --git a/src/login/loginctl.c b/src/login/loginctl.c index d0987fcd1..ab1b56201 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -146,7 +146,7 @@ static int list_sessions(int argc, char *argv[], void *userdata) { if (r < 0) return bus_log_parse_error(r); - table = table_new("SESSION", "UID", "USER", "SEAT", "TTY"); + table = table_new("session", "uid", "user", "seat", "tty"); if (!table) return log_oom(); @@ -227,7 +227,7 @@ static int list_users(int argc, char *argv[], void *userdata) { if (r < 0) return bus_log_parse_error(r); - table = table_new("UID", "USER"); + table = table_new("uid", "user"); if (!table) return log_oom(); @@ -284,7 +284,7 @@ static int list_seats(int argc, char *argv[], void *userdata) { if (r < 0) return bus_log_parse_error(r); - table = table_new("SEAT"); + table = table_new("seat"); if (!table) return log_oom(); diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index b7a604a55..c5fe01406 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -300,7 +300,7 @@ static int list_machines(int argc, char *argv[], void *userdata) { if (r < 0) return log_error_errno(r, "Could not get machines: %s", bus_error_message(&error, r)); - table = table_new("MACHINE", "CLASS", "SERVICE", "OS", "VERSION", "ADDRESSES"); + table = table_new("machine", "class", "service", "os", "version", "addresses"); if (!table) return log_oom(); @@ -380,7 +380,7 @@ static int list_images(int argc, char *argv[], void *userdata) { if (r < 0) return log_error_errno(r, "Could not get images: %s", bus_error_message(&error, r)); - table = table_new("NAME", "TYPE", "RO", "USAGE", "CREATED", "MODIFIED"); + table = table_new("name", "type", "ro", "usage", "created", "modified"); if (!table) return log_oom(); diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c index 02d395489..4763c0d7d 100644 --- a/src/portable/portablectl.c +++ b/src/portable/portablectl.c @@ -500,7 +500,7 @@ static int list_images(int argc, char *argv[], void *userdata) { if (r < 0) return log_error_errno(r, "Failed to list images: %s", bus_error_message(&error, r)); - table = table_new("NAME", "TYPE", "RO", "CRTIME", "MTIME", "USAGE", "STATE"); + table = table_new("name", "type", "ro", "crtime", "mtime", "usage", "state"); if (!table) return log_oom(); diff --git a/src/test/test-format-table.c b/src/test/test-format-table.c index 2527cacbb..5bede5c75 100644 --- a/src/test/test-format-table.c +++ b/src/test/test-format-table.c @@ -9,7 +9,7 @@ static void test_issue_9549(void) { _cleanup_(table_unrefp) Table *table = NULL; _cleanup_free_ char *formatted = NULL; - assert_se(table = table_new("NAME", "TYPE", "RO", "USAGE", "CREATED", "MODIFIED")); + assert_se(table = table_new("name", "type", "ro", "usage", "created", "modified")); assert_se(table_set_align_percent(table, TABLE_HEADER_CELL(3), 100) >= 0); assert_se(table_add_many(table, TABLE_STRING, "foooo", @@ -36,7 +36,7 @@ int main(int argc, char *argv[]) { assert_se(setenv("COLUMNS", "40", 1) >= 0); - assert_se(t = table_new("ONE", "TWO", "THREE")); + assert_se(t = table_new("one", "two", "three")); assert_se(table_set_align_percent(t, TABLE_HEADER_CELL(2), 100) >= 0); |