]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/m_ife.c
fix print_0xhex on 32 bit
[mirror_iproute2.git] / tc / m_ife.c
index 15d09a167450b4f7cdc99f6c86f43b1c3565c0a4..2bf9f2047b46df7e6ce15351011b488fffb384ab 100644 (file)
@@ -94,9 +94,7 @@ static int parse_ife(struct action_util *a, int *argc_p, char ***argv_p,
                        } else if (matches(*argv, "tcindex") == 0) {
                                ife_tcindex = IFE_META_TCINDEX;
                        } else {
-                               fprintf(stderr, "Illegal meta define <%s>\n",
-                                       *argv);
-                               return -1;
+                               invarg("Illegal meta define", *argv);
                        }
                } else if (matches(*argv, "use") == 0) {
                        NEXT_ARG();
@@ -116,9 +114,7 @@ static int parse_ife(struct action_util *a, int *argc_p, char ***argv_p,
                                        invarg("ife tcindex val is invalid",
                                               *argv);
                        } else {
-                               fprintf(stderr, "Illegal meta use type <%s>\n",
-                                       *argv);
-                               return -1;
+                               invarg("Illegal meta use type", *argv);
                        }
                } else if (matches(*argv, "type") == 0) {
                        NEXT_ARG();
@@ -132,8 +128,7 @@ static int parse_ife(struct action_util *a, int *argc_p, char ***argv_p,
                        if (sscanf(daddr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
                                   dbuf, dbuf + 1, dbuf + 2,
                                   dbuf + 3, dbuf + 4, dbuf + 5) != 6) {
-                               fprintf(stderr, "Invalid mac address %s\n",
-                                       daddr);
+                               invarg("Invalid mac address", *argv);
                        }
                        fprintf(stderr, "dst MAC address <%s>\n", daddr);
 
@@ -143,8 +138,7 @@ static int parse_ife(struct action_util *a, int *argc_p, char ***argv_p,
                        if (sscanf(saddr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
                                   sbuf, sbuf + 1, sbuf + 2,
                                   sbuf + 3, sbuf + 4, sbuf + 5) != 6) {
-                               fprintf(stderr, "Invalid mac address %s\n",
-                                       saddr);
+                               invarg("Invalid mac address", *argv);
                        }
                        fprintf(stderr, "src MAC address <%s>\n", saddr);
                } else if (matches(*argv, "help") == 0) {
@@ -246,14 +240,14 @@ static int print_ife(struct action_util *au, FILE *f, struct rtattr *arg)
        p = RTA_DATA(tb[TCA_IFE_PARMS]);
 
        print_string(PRINT_ANY, "kind", "%s ", "ife");
-       print_string(PRINT_ANY, "mode", "%s",
+       print_string(PRINT_ANY, "mode", "%s ",
                     p->flags & IFE_ENCODE ? "encode" : "decode");
        print_action_control(f, "action ", p->action, " ");
 
        if (tb[TCA_IFE_TYPE]) {
                ife_type = rta_getattr_u16(tb[TCA_IFE_TYPE]);
                has_optional = 1;
-               print_0xhex(PRINT_ANY, "type", "type 0x%X ", ife_type);
+               print_0xhex(PRINT_ANY, "type", "type %#llX ", ife_type);
        }
 
        if (has_optional)