]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc: print raw qdisc handle.
authorRoman Mashak <mrv@mojatatu.com>
Mon, 14 Nov 2016 22:59:20 +0000 (17:59 -0500)
committerStephen Hemminger <sthemmin@microsoft.com>
Tue, 29 Nov 2016 19:41:58 +0000 (11:41 -0800)
This is v2 patch with fixed code indentation.

Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
tc/tc_qdisc.c

index 93c9a4c1daa287b32b5e64b4f13a6217f4cd824c..51320bd47766f4d2ccd58e74d63bef6706f6a900 100644 (file)
@@ -231,7 +231,14 @@ int print_qdisc(const struct sockaddr_nl *who,
        if (n->nlmsg_type == RTM_DELQDISC)
                fprintf(fp, "deleted ");
 
-       fprintf(fp, "qdisc %s %x: ", rta_getattr_str(tb[TCA_KIND]), t->tcm_handle>>16);
+       if (show_raw)
+               fprintf(fp, "qdisc %s %x:[%08x]  ",
+                       rta_getattr_str(tb[TCA_KIND]),
+                       t->tcm_handle >> 16, t->tcm_handle);
+       else
+               fprintf(fp, "qdisc %s %x: ", rta_getattr_str(tb[TCA_KIND]),
+                       t->tcm_handle >> 16);
+
        if (filter_ifindex == 0)
                fprintf(fp, "dev %s ", ll_index_to_name(t->tcm_ifindex));
        if (t->tcm_parent == TC_H_ROOT)