* [PATCH iproute2] tc/action: print error to stderr
@ 2022-01-20 21:06 Stephen Hemminger
2022-01-20 21:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2022-01-20 21:06 UTC (permalink / raw)
To: netdev; +Cc: Stephen Hemminger, jiri
Error messages should go to stderr even if using JSON.
Fixes: 2704bd625583 ("tc: jsonify actions core")
Cc: jiri@mellanox.com
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
tc/m_action.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tc/m_action.c b/tc/m_action.c
index b16882a345dc..ee32aeda98fd 100644
--- a/tc/m_action.c
+++ b/tc/m_action.c
@@ -466,10 +466,8 @@ tc_print_action(FILE *f, const struct rtattr *arg, unsigned short tot_acts)
print_nl();
print_uint(PRINT_ANY, "order",
"\taction order %u: ", i);
- if (tc_print_one_action(f, tb[i]) < 0) {
- print_string(PRINT_FP, NULL,
- "Error printing action\n", NULL);
- }
+ if (tc_print_one_action(f, tb[i]) < 0)
+ fprintf(stderr, "Error printing action\n");
close_json_object();
}
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2] tc/action: print error to stderr
2022-01-20 21:06 [PATCH iproute2] tc/action: print error to stderr Stephen Hemminger
@ 2022-01-20 21:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-20 21:10 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, jiri
Hello:
This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:
On Thu, 20 Jan 2022 13:06:46 -0800 you wrote:
> Error messages should go to stderr even if using JSON.
>
> Fixes: 2704bd625583 ("tc: jsonify actions core")
> Cc: jiri@mellanox.com
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> tc/m_action.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
Here is the summary with links:
- [iproute2] tc/action: print error to stderr
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=d542543bb5ec
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-20 21:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-20 21:06 [PATCH iproute2] tc/action: print error to stderr Stephen Hemminger
2022-01-20 21:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).