]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: use lowercase table headers 13076/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 16 Jul 2019 11:32:51 +0000 (13:32 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 16 Jul 2019 12:29:04 +0000 (14:29 +0200)
https://github.com/systemd/systemd/pull/13062#discussion_r303847484
> the formatter uppercases them anyway, and this way the JSON output of the
> formatter is nicer as it uses the table header fields 1:1 for the json
> output.

src/analyze/analyze.c
src/network/networkctl.c

index e9e66b3da661820c698136ea4f7db3bf52911245..92727974d69b6e11c37bbe94a9c1c21080984bc0 100644 (file)
@@ -1080,7 +1080,7 @@ static int analyze_blame(int argc, char *argv[], void *userdata) {
         if (n <= 0)
                 return n;
 
-        table = table_new("TIME", "UNIT");
+        table = table_new("time", "unit");
         if (!table)
                 return log_oom();
 
@@ -1733,7 +1733,7 @@ static int dump_timespan(int argc, char *argv[], void *userdata) {
                         return r;
                 }
 
-                table = table_new("NAME", "VALUE");
+                table = table_new("name", "value");
                 if (!table)
                         return log_oom();
 
@@ -1805,7 +1805,7 @@ static int test_timestamp_one(const char *p) {
                 return r;
         }
 
-        table = table_new("NAME", "VALUE");
+        table = table_new("name", "value");
         if (!table)
                 return log_oom();
 
@@ -1914,7 +1914,7 @@ static int test_calendar_one(usec_t n, const char *p) {
         if (r < 0)
                 return log_error_errno(r, "Failed to format calendar specification '%s': %m", p);
 
-        table = table_new("NAME", "VALUE");
+        table = table_new("name", "value");
         if (!table)
                 return log_oom();
 
index 9d755c96d6fad51e699864b4dbe5b30b6e64e263..5f74f7b5cc8d7661f8221429ed1228d5f1f7808e 100644 (file)
@@ -324,7 +324,7 @@ static int list_links(int argc, char *argv[], void *userdata) {
 
         (void) pager_open(arg_pager_flags);
 
-        table = table_new("IDX", "LINK", "TYPE", "OPERATIONAL", "SETUP");
+        table = table_new("idx", "link", "type", "operational", "setup");
         if (!table)
                 return log_oom();
 
@@ -658,7 +658,7 @@ static int dump_address_labels(sd_netlink *rtnl) {
         if (r < 0)
                 return r;
 
-        table = table_new("Label", "Prefix/Prefixlen");
+        table = table_new("label", "prefix/prefixlen");
         if (!table)
                 return -ENOMEM;
 
@@ -972,7 +972,7 @@ static int link_status_one(
         (void) sd_network_link_get_carrier_bound_to(info->ifindex, &carrier_bound_to);
         (void) sd_network_link_get_carrier_bound_by(info->ifindex, &carrier_bound_by);
 
-        table = table_new("DOT", "KEY", "VALUE");
+        table = table_new("dot", "key", "value");
         if (!table)
                 return -ENOMEM;
 
@@ -1274,7 +1274,7 @@ static int system_status(sd_netlink *rtnl, sd_hwdb *hwdb) {
         (void) sd_network_get_operational_state(&operational_state);
         operational_state_to_color(operational_state, &on_color_operational, &off_color_operational);
 
-        table = table_new("DOT", "KEY", "VALUE");
+        table = table_new("dot", "key", "value");
         if (!table)
                 return -ENOMEM;
 
@@ -1439,12 +1439,12 @@ static int link_lldp_status(int argc, char *argv[], void *userdata) {
 
         (void) pager_open(arg_pager_flags);
 
-        table = table_new("LINK",
-                          "CHASSIS ID",
-                          "SYSTEM NAME",
-                          "CAPS",
-                          "PORT ID",
-                          "PORT DESCRIPTION");
+        table = table_new("link",
+                          "chassis id",
+                          "system name",
+                          "caps",
+                          "port id",
+                          "port description");
         if (!table)
                 return -ENOMEM;