diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-23 10:39:42 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-23 10:39:42 +0900 |
commit | 38747657358463c56d25b82535075dd42ab809e0 (patch) | |
tree | 8ceb343dc4426bdd333206660c46e0770854ba92 | |
parent | 67c3e1f63a5221b47a8fea85ae421671f29f3b7e (diff) | |
download | systemd-38747657358463c56d25b82535075dd42ab809e0.tar.gz |
networkctl: use "-" for empty LLDP entries
-rw-r--r-- | src/network/networkctl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 5189ff2280..bb4aa7d52e 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -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); |