summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-09-23 03:39:42 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-09-23 03:39:42 +0200
commit38747657358463c56d25b82535075dd42ab809e0 (patch)
tree8ceb343dc4426bdd333206660c46e0770854ba92 /src/network
parentudev: support by-path devlink for multipath nvme block devices (diff)
downloadsystemd-38747657358463c56d25b82535075dd42ab809e0.tar.xz
systemd-38747657358463c56d25b82535075dd42ab809e0.zip
networkctl: use "-" for empty LLDP entries
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkctl.c11
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);