1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-11 05:17:44 +03:00

networkctl: use "-" for empty LLDP entries

This commit is contained in:
Yu Watanabe 2022-09-23 10:39:42 +09:00
parent 67c3e1f63a
commit 3874765735

View File

@ -2482,6 +2482,7 @@ static int link_lldp_status(int argc, char *argv[], void *userdata) {
assert_se(cell = table_get_cell(table, 0, 3));
table_set_minimum_width(table, cell, 11);
table_set_ersatz_string(table, TABLE_ERSATZ_DASH);
for (int i = 0; i < c; i++) {
_cleanup_fclose_ FILE *f = NULL;
@ -2520,11 +2521,11 @@ static int link_lldp_status(int argc, char *argv[], void *userdata) {
r = table_add_many(table,
TABLE_STRING, links[i].name,
TABLE_STRING, strna(chassis_id),
TABLE_STRING, strna(system_name),
TABLE_STRING, strna(capabilities),
TABLE_STRING, strna(port_id),
TABLE_STRING, strna(port_description));
TABLE_STRING, chassis_id,
TABLE_STRING, system_name,
TABLE_STRING, capabilities,
TABLE_STRING, port_id,
TABLE_STRING, port_description);
if (r < 0)
return table_log_add_error(r);