1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-03 16:58:37 +03:00

tree-wide: specify all table headers in lower-case

This commit is contained in:
Lennart Poettering 2018-12-03 21:39:12 +01:00
parent 359abf6dd0
commit 9969b54279
6 changed files with 11 additions and 11 deletions

View File

@ -1393,7 +1393,7 @@ static int assess(const struct security_info *info, Table *overview_table, Analy
int r; int r;
if (!FLAGS_SET(flags, ANALYZE_SECURITY_SHORT)) { 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) if (!details_table)
return log_oom(); return log_oom();
@ -1967,7 +1967,7 @@ int analyze_security(sd_bus *bus, char **units, AnalyzeSecurityFlags flags) {
assert(bus); assert(bus);
if (strv_length(units) != 1) { if (strv_length(units) != 1) {
overview_table = table_new("UNIT", "EXPOSURE", "PREDICATE", "HAPPY"); overview_table = table_new("unit", "exposure", "predicate", "happy");
if (!overview_table) if (!overview_table)
return log_oom(); return log_oom();
} }

View File

@ -83,7 +83,7 @@ static int print_inhibitors(sd_bus *bus) {
if (r < 0) if (r < 0)
return log_error_errno(r, "Could not get active inhibitors: %s", bus_error_message(&error, r)); 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) if (!table)
return log_oom(); return log_oom();

View File

@ -146,7 +146,7 @@ static int list_sessions(int argc, char *argv[], void *userdata) {
if (r < 0) if (r < 0)
return bus_log_parse_error(r); return bus_log_parse_error(r);
table = table_new("SESSION", "UID", "USER", "SEAT", "TTY"); table = table_new("session", "uid", "user", "seat", "tty");
if (!table) if (!table)
return log_oom(); return log_oom();
@ -227,7 +227,7 @@ static int list_users(int argc, char *argv[], void *userdata) {
if (r < 0) if (r < 0)
return bus_log_parse_error(r); return bus_log_parse_error(r);
table = table_new("UID", "USER"); table = table_new("uid", "user");
if (!table) if (!table)
return log_oom(); return log_oom();
@ -284,7 +284,7 @@ static int list_seats(int argc, char *argv[], void *userdata) {
if (r < 0) if (r < 0)
return bus_log_parse_error(r); return bus_log_parse_error(r);
table = table_new("SEAT"); table = table_new("seat");
if (!table) if (!table)
return log_oom(); return log_oom();

View File

@ -300,7 +300,7 @@ static int list_machines(int argc, char *argv[], void *userdata) {
if (r < 0) if (r < 0)
return log_error_errno(r, "Could not get machines: %s", bus_error_message(&error, r)); 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) if (!table)
return log_oom(); return log_oom();
@ -380,7 +380,7 @@ static int list_images(int argc, char *argv[], void *userdata) {
if (r < 0) if (r < 0)
return log_error_errno(r, "Could not get images: %s", bus_error_message(&error, r)); 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) if (!table)
return log_oom(); return log_oom();

View File

@ -500,7 +500,7 @@ static int list_images(int argc, char *argv[], void *userdata) {
if (r < 0) if (r < 0)
return log_error_errno(r, "Failed to list images: %s", bus_error_message(&error, r)); 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) if (!table)
return log_oom(); return log_oom();

View File

@ -9,7 +9,7 @@ static void test_issue_9549(void) {
_cleanup_(table_unrefp) Table *table = NULL; _cleanup_(table_unrefp) Table *table = NULL;
_cleanup_free_ char *formatted = 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_set_align_percent(table, TABLE_HEADER_CELL(3), 100) >= 0);
assert_se(table_add_many(table, assert_se(table_add_many(table,
TABLE_STRING, "foooo", TABLE_STRING, "foooo",
@ -36,7 +36,7 @@ int main(int argc, char *argv[]) {
assert_se(setenv("COLUMNS", "40", 1) >= 0); 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); assert_se(table_set_align_percent(t, TABLE_HEADER_CELL(2), 100) >= 0);