]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: specify all table headers in lower-case
authorLennart Poettering <lennart@poettering.net>
Mon, 3 Dec 2018 20:39:12 +0000 (21:39 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 3 Dec 2018 21:42:38 +0000 (22:42 +0100)
src/analyze/analyze-security.c
src/login/inhibit.c
src/login/loginctl.c
src/machine/machinectl.c
src/portable/portablectl.c
src/test/test-format-table.c

index 6402d4504af6588905c5da94131f897115d98416..9f327d365e4affad09f7d521adb275baa0b24e94 100644 (file)
@@ -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();
         }
index 2394c5d937eb4a171dd9061e651779acacbcdfdf..03bbf3b82604f2ca4491f1f5b1f6df2c0c0046ba 100644 (file)
@@ -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();
 
index d0987fcd1a5cd8ac9c8145113dacdad99493ebd5..ab1b56201a37be0f0be339721ddb95c26ce8932e 100644 (file)
@@ -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();
 
index b7a604a55c4da8dab928dfecacabdcd22ec067ce..c5fe01406e756d1e7c3bdafa3a22910a1d99fce1 100644 (file)
@@ -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();
 
index 02d3954897c05faf6eb0f7123aa4ae01fe61b631..4763c0d7d06bd105d2fe502dee84f633eb987645 100644 (file)
@@ -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();
 
index 2527cacbbd117632799bc26248c8006b261c07a2..5bede5c75b4b04555b91bb5657cd9ea7ea3b04f0 100644 (file)
@@ -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);