]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/q_mqprio.c
tc: m_action: check cookie hex string len
[mirror_iproute2.git] / tc / q_mqprio.c
index 89b460020e27ea8e63e07c2d98eff04ef5819ac3..0eb41308a3fbc7ebbbf2bcb6558723c8cd74eb64 100644 (file)
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... mqprio [num_tc NUMBER] [map P0 P1 ...]\n");
-       fprintf(stderr, "                  [queues count1@offset1 count2@offset2 ...] ");
-       fprintf(stderr, "[hw 1|0]\n");
-       fprintf(stderr, "                  [mode dcb|channel]\n");
-       fprintf(stderr, "                  [shaper bw_rlimit SHAPER_PARAMS]\n"
+       fprintf(stderr,
+               "Usage: ... mqprio      [num_tc NUMBER] [map P0 P1 ...]\n"
+               "                       [queues count1@offset1 count2@offset2 ...] "
+               "[hw 1|0]\n"
+               "                       [mode dcb|channel]\n"
+               "                       [shaper bw_rlimit SHAPER_PARAMS]\n"
                "Where: SHAPER_PARAMS := { min_rate MIN_RATE1 MIN_RATE2 ...|\n"
-               "                          max_rate MAX_RATE1 MAX_RATE2 ... }\n");
+               "                         max_rate MAX_RATE1 MAX_RATE2 ... }\n");
 }
 
 static int mqprio_parse_opt(struct qdisc_util *qu, int argc,
@@ -167,8 +168,7 @@ static int mqprio_parse_opt(struct qdisc_util *qu, int argc,
                        explain();
                        return -1;
                } else {
-                       fprintf(stderr, "Unknown argument\n");
-                       return -1;
+                       invarg("unknown argument", *argv);
                }
                argc--; argv++;
        }