[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221210034736.90666-1-stephen@networkplumber.org>
Date: Fri, 9 Dec 2022 19:47:36 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: netdev@...r.kernel.org
Cc: Stephen Hemminger <stephen@...workplumber.org>
Subject: [PATCH] tc: print errors on stderr
Don't mix output and errors.
Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
---
tc/tc_class.c | 2 +-
tc/tc_monitor.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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;
--
2.35.1
Powered by blists - more mailing lists