diff mbox series

[v2,3/4] monitor: print out type of unknown element

Message ID 20220809210449.158256-3-prestwoj@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show
Series [v2,1/4] monitor: parse RNR element | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success

Commit Message

James Prestwood Aug. 9, 2022, 9:04 p.m. UTC
This changes the string from "Reserved" to "Unknown" which feels
more fitting, and also prints out the NL type of the unknown
element.
---
 monitor/nlmon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/monitor/nlmon.c b/monitor/nlmon.c
index 8b70b055..e880ca1e 100644
--- a/monitor/nlmon.c
+++ b/monitor/nlmon.c
@@ -6743,7 +6743,7 @@  static void print_attributes(int indent, const struct attr_entry *table,
 		int64_t val_s64;
 		uint8_t *ptr;
 
-		str = "Reserved";
+		str = "Unknown";
 		type = ATTR_UNSPEC;
 		array_type = ATTR_UNSPEC;
 		nested = NULL;
@@ -6763,7 +6763,7 @@  static void print_attributes(int indent, const struct attr_entry *table,
 
 		switch (type) {
 		case ATTR_UNSPEC:
-			print_attr(indent, "%s: len %u", str,
+			print_attr(indent, "%s: %u len %u", str, nla_type,
 						NLA_PAYLOAD(nla));
 			print_hexdump(indent + 1,
 					NLA_DATA(nla), NLA_PAYLOAD(nla));