|
|
92997e |
From 799367ff00cd0c85acd0bbea3dcec619e48b5601 Mon Sep 17 00:00:00 2001
|
|
Ryan Wilson |
9cbcc8 |
From: Ryan Wilson <ryantimwilson@meta4.com>
|
|
Ryan Wilson |
9cbcc8 |
Date: Tue, 3 Dec 2024 14:46:54 -0800
|
|
Ryan Wilson |
9cbcc8 |
Subject: [PATCH] networkctl: Make networkctl lldp output backwards compatible
|
|
Ryan Wilson |
9cbcc8 |
with 255
|
|
Ryan Wilson |
9cbcc8 |
|
|
Ryan Wilson |
9cbcc8 |
---
|
|
|
92997e |
src/network/networkctl-lldp.c | 16 +++++++---------
|
|
Ryan Wilson |
9cbcc8 |
1 file changed, 7 insertions(+), 9 deletions(-)
|
|
Ryan Wilson |
9cbcc8 |
|
|
|
92997e |
diff --git a/src/network/networkctl-lldp.c b/src/network/networkctl-lldp.c
|
|
|
92997e |
index 43ffbab..b1dc927 100644
|
|
|
92997e |
--- a/src/network/networkctl-lldp.c
|
|
|
92997e |
+++ b/src/network/networkctl-lldp.c
|
|
|
92997e |
@@ -238,12 +238,11 @@ int link_lldp_status(int argc, char *argv[], void *userdata) {
|
|
Ryan Wilson |
9cbcc8 |
|
|
Ryan Wilson |
9cbcc8 |
table = table_new("index",
|
|
Ryan Wilson |
9cbcc8 |
"link",
|
|
Ryan Wilson |
9cbcc8 |
- "system-name",
|
|
Ryan Wilson |
9cbcc8 |
- "system-description",
|
|
Ryan Wilson |
9cbcc8 |
"chassis-id",
|
|
Ryan Wilson |
9cbcc8 |
+ "system-name",
|
|
Ryan Wilson |
9cbcc8 |
+ "caps",
|
|
Ryan Wilson |
9cbcc8 |
"port-id",
|
|
Ryan Wilson |
9cbcc8 |
- "port-description",
|
|
Ryan Wilson |
9cbcc8 |
- "caps");
|
|
Ryan Wilson |
9cbcc8 |
+ "port-description");
|
|
Ryan Wilson |
9cbcc8 |
if (!table)
|
|
Ryan Wilson |
9cbcc8 |
return log_oom();
|
|
Ryan Wilson |
9cbcc8 |
|
|
|
92997e |
@@ -256,7 +255,7 @@ int link_lldp_status(int argc, char *argv[], void *userdata) {
|
|
Ryan Wilson |
9cbcc8 |
table_hide_column_from_display(table, (size_t) 0);
|
|
Ryan Wilson |
9cbcc8 |
|
|
Ryan Wilson |
9cbcc8 |
/* Make the capabilities not truncated */
|
|
Ryan Wilson |
9cbcc8 |
- assert_se(cell = table_get_cell(table, 0, 7));
|
|
Ryan Wilson |
9cbcc8 |
+ assert_se(cell = table_get_cell(table, 0, 4));
|
|
Ryan Wilson |
9cbcc8 |
table_set_minimum_width(table, cell, 11);
|
|
Ryan Wilson |
9cbcc8 |
|
|
|
92997e |
sd_json_variant *i;
|
|
|
92997e |
@@ -285,12 +284,11 @@ int link_lldp_status(int argc, char *argv[], void *userdata) {
|
|
Ryan Wilson |
9cbcc8 |
r = table_add_many(table,
|
|
Ryan Wilson |
9cbcc8 |
TABLE_INT, info.ifindex,
|
|
Ryan Wilson |
9cbcc8 |
TABLE_STRING, info.ifname,
|
|
Ryan Wilson |
9cbcc8 |
- TABLE_STRING, neighbor_info.system_name,
|
|
Ryan Wilson |
9cbcc8 |
- TABLE_STRING, neighbor_info.system_description,
|
|
Ryan Wilson |
9cbcc8 |
TABLE_STRING, neighbor_info.chassis_id,
|
|
Ryan Wilson |
9cbcc8 |
+ TABLE_STRING, neighbor_info.system_name,
|
|
Ryan Wilson |
9cbcc8 |
+ TABLE_STRING, cap_str,
|
|
Ryan Wilson |
9cbcc8 |
TABLE_STRING, neighbor_info.port_id,
|
|
Ryan Wilson |
9cbcc8 |
- TABLE_STRING, neighbor_info.port_description,
|
|
Ryan Wilson |
9cbcc8 |
- TABLE_STRING, cap_str);
|
|
Ryan Wilson |
9cbcc8 |
+ TABLE_STRING, neighbor_info.port_description);
|
|
Ryan Wilson |
9cbcc8 |
if (r < 0)
|
|
Ryan Wilson |
9cbcc8 |
return table_log_add_error(r);
|
|
Ryan Wilson |
9cbcc8 |
|
|
Ryan Wilson |
9cbcc8 |
--
|
|
|
92997e |
2.47.1
|
|
Ryan Wilson |
9cbcc8 |
|