Message ID | 20221210034736.90666-1-stephen@networkplumber.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 523692fa17e3b7a252859c6eda84b92368ca5bc7 |
Headers | show |
Series | tc: print errors on stderr | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
Hello: This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <stephen@networkplumber.org>: On Fri, 9 Dec 2022 19:47:36 -0800 you wrote: > Don't mix output and errors. > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> > --- > tc/tc_class.c | 2 +- > tc/tc_monitor.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Here is the summary with links: - tc: print errors on stderr https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=523692fa17e3 You are awesome, thank you!
diff --git a/tc/tc_class.c b/tc/tc_class.c index b3e7c92491e0..1297d152fd5f 100644 --- a/tc/tc_class.c +++ b/tc/tc_class.c @@ -365,7 +365,7 @@ int print_class(struct nlmsghdr *n, void *arg) if (q && q->print_copt) q->print_copt(q, fp, tb[TCA_OPTIONS]); else - fprintf(fp, "[cannot parse class parameters]"); + fprintf(stderr, "[cannot parse class parameters]"); } fprintf(fp, "\n"); if (show_stats) { diff --git a/tc/tc_monitor.c b/tc/tc_monitor.c index c279a4a1a898..64f31491607e 100644 --- a/tc/tc_monitor.c +++ b/tc/tc_monitor.c @@ -67,7 +67,7 @@ static int accept_tcmsg(struct rtnl_ctrl_data *ctrl, } if (n->nlmsg_type != NLMSG_ERROR && n->nlmsg_type != NLMSG_NOOP && n->nlmsg_type != NLMSG_DONE) { - fprintf(fp, "Unknown message: length %08d type %08x flags %08x\n", + fprintf(stderr, "Unknown message: length %08d type %08x flags %08x\n", n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags); } return 0;
Don't mix output and errors. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- tc/tc_class.c | 2 +- tc/tc_monitor.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)