Skip to contentSkip to conversation

tc: print errors on stderr

PATCH Applied Stephen Hemminger 2 participants 2 messages Dec 10, 2022 – Dec 12, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tc: print errors on stderr

Don't mix output and errors.

---
 tc/tc_class.c   | 2 +-
 tc/tc_monitor.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tc/tc_class.c +1 -1
index b3e7c92491e0..1297d152fd5f 100644
@@ -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) {
tc/tc_monitor.c +1 -1
index c279a4a1a898..64f31491607e 100644
@@ -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;
Signature · 1 line
2.35.1
#1 lore raw
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Quoted 7 lines · On Fri, 9 Dec 2022 19:47:36 -0800 you wrote:

Don't mix output and errors.

---
 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html