From: Lennart Poettering Date: Mon, 3 Dec 2018 20:39:12 +0000 (+0100) Subject: tree-wide: specify all table headers in lower-case X-Git-Tag: v240~143^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9969b5427967dc7bcbd9a14ea4d6ae8133c5fec0;p=thirdparty%2Fsystemd.git tree-wide: specify all table headers in lower-case --- diff --git a/src/analyze/analyze-security.c b/src/analyze/analyze-security.c index 6402d4504af..9f327d365e4 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 2394c5d937e..03bbf3b8260 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 d0987fcd1a5..ab1b56201a3 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 b7a604a55c4..c5fe01406e7 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 02d3954897c..4763c0d7d06 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 2527cacbbd1..5bede5c75b4 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);