tc: bpf: fix extra newline in JSON output
Subsystems (2)
PATCH 1/2 tc: bpf: fix extra newline in JSON output
Don't print newline at end of bpf if in JSON mode.
Signed-off-by Stephen Hemminger <[email protected]>
--- tc/m_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tc/m_bpf.c +1 -1
@@ -204,7 +204,7 @@ static int bpf_print_opt(struct action_util *au, FILE *f, struct rtattr *arg) } } -fprintf (f,"\n " ); +print_string (PRINT_FP ,NULL ,"%s" ,"\n " );return 0 ; }
Signature · 1 line
2.43.0
PATCH 2/2 tc: print unknown action on stderr
This is an error, and should not go to stdout.
Signed-off-by Stephen Hemminger <[email protected]>
--- tc/m_action.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tc/m_action.c +1 -1
@@ -62,7 +62,7 @@ static void act_usage(void)static int print_noaopt (struct action_util *au,FILE *f,struct rtattr *opt) {if (opt &&RTA_PAYLOAD (opt)) -fprintf (f,"[Unknown action, optlen=%u] " , +fprintf (stderr,"[Unknown action, optlen=%u] " , (unsigned int )RTA_PAYLOAD (opt));return 0 ; }
Signature · 1 line
2.43.0
This series was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:
Hello:
This series was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:
Quoted 6 lines · On Fri, 9 Feb 2024 15:55:56 -0800 you wrote:
Don't print newline at end of bpf if in JSON mode.
Signed-off-by Stephen Hemminger <[email protected]>--- tc/m_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [iproute2,1/2] tc: bpf: fix extra newline in JSON output
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=46031294e3e2 - [iproute2,2/2] tc: print unknown action on stderr https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=b958d3c25dcc
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html