]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
pedit: log errors to stderr
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 12 Mar 2024 22:40:26 +0000 (15:40 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 13 Mar 2024 17:07:33 +0000 (10:07 -0700)
The errors should bo to stderr, not to stdout.

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

index 83a0c42e58aa44c82633d7ed79195ec74505c355..5c84a9087bdbc01194231d1b304ac055ff9de206 100644 (file)
@@ -771,20 +771,20 @@ static int print_pedit(const struct action_util *au, FILE *f, struct rtattr *arg
                sel = RTA_DATA(tb[TCA_PEDIT_PARMS_EX]);
 
                if (!tb[TCA_PEDIT_KEYS_EX]) {
-                       fprintf(f, "Netlink error\n");
+                       fprintf(stderr, "Netlink error\n");
                        return -1;
                }
 
                keys_ex = calloc(sel->nkeys, sizeof(*keys_ex));
                if (!keys_ex) {
-                       fprintf(f, "Out of memory\n");
+                       fprintf(stderr, "Out of memory\n");
                        return -1;
                }
 
                err = pedit_keys_ex_getattr(tb[TCA_PEDIT_KEYS_EX], keys_ex,
                                            sel->nkeys);
                if (err) {
-                       fprintf(f, "Netlink error\n");
+                       fprintf(stderr, "Netlink error\n");
 
                        free(keys_ex);
                        return -1;