Thread (6 messages) 6 messages, 3 authors, 2022-01-18

Re: [PATCH iproute2 v4 1/2] tc: u32: add support for json output

From: David Ahern <hidden>
Date: 2022-01-18 20:04:57

On 1/17/22 7:42 PM, Wen Liang wrote:
quoted hunk ↗ jump to hunk
diff --git a/tc/f_u32.c b/tc/f_u32.c
index a5747f67..03dbe774 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -1213,11 +1213,11 @@ static int u32_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt,
 
 	if (handle) {
 		SPRINT_BUF(b1);
-		fprintf(f, "fh %s ", sprint_u32_handle(handle, b1));
+		print_string(PRINT_ANY, "fh", "fh %s ", sprint_u32_handle(handle, b1));
sprint_u32_handle adds a space after the raw check. I think that space
can be removed.

Also, seems like raw and json should be incompatible.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help