]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc: print errors on stderr
authorStephen Hemminger <stephen@networkplumber.org>
Sat, 10 Dec 2022 03:47:03 +0000 (19:47 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Sat, 10 Dec 2022 03:47:03 +0000 (19:47 -0800)
Don't mix output and errors.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/tc_class.c
tc/tc_monitor.c

index b3e7c92491e079e373055f678332ac981fb4c28b..1297d152fd5f3e949cc085946bf2e14c20d5bafe 100644 (file)
@@ -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) {
index c279a4a1a89831c2e45e0877e6e8404a2e88be1f..64f31491607e779c745051a1d40593b222d48358 100644 (file)
@@ -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;