From: Stephen Hemminger Date: Sat, 10 Dec 2022 03:47:03 +0000 (-0800) Subject: tc: print errors on stderr X-Git-Tag: v6.1.0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=523692fa17e3b7a252859c6eda84b92368ca5bc7;p=thirdparty%2Fiproute2.git tc: print errors on stderr Don't mix output and errors. Signed-off-by: Stephen Hemminger --- diff --git a/tc/tc_class.c b/tc/tc_class.c index b3e7c9249..1297d152f 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 c279a4a1a..64f314916 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;