1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

networkctl: use "-" for empty fields

This looks nicer. Some fields were already using "-" as fallback, e.g. Speed,
so this makes things more consistent too.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-09-20 20:41:31 +02:00
parent 639405b934
commit 5515f2169c
2 changed files with 3 additions and 3 deletions

View File

@ -817,7 +817,7 @@ static int list_links(int argc, char *argv[], void *userdata) {
table_set_width(table, 0);
table_set_header(table, arg_legend);
if (table_set_empty_string(table, "n/a") < 0)
if (table_set_empty_string(table, "-") < 0)
return log_oom();
assert_se(cell = table_get_cell(table, 0, 0));

View File

@ -1047,8 +1047,8 @@ class NetworkctlTests(unittest.TestCase, Utilities):
output = check_output(*networkctl_cmd, '-n', '0', 'status', 'lo', env=env)
print(output)
self.assertRegex(output, r'Link File: n/a')
self.assertRegex(output, r'Network File: n/a')
self.assertRegex(output, r'Link File: -')
self.assertRegex(output, r'Network File: -')
def test_delete_links(self):
copy_network_unit('11-dummy.netdev', '11-dummy.network',