]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Import patch iproute2.116
authornet[shemminger]!shemminger <net[shemminger]!shemminger>
Mon, 17 Jan 2005 23:28:16 +0000 (23:28 +0000)
committernet[shemminger]!shemminger <net[shemminger]!shemminger>
Mon, 17 Jan 2005 23:28:16 +0000 (23:28 +0000)
(Logical change 1.118)

ChangeLog
ip/ipxfrm.c
tc/f_u32.c
tc/q_hfsc.c
tc/tc_util.c

index b9ee19db4298f065147d44788f942dde084cb173..988224586d006caa0a65fbc2753a4105a78dd5c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-12  Stephen Hemminger  <shemminger@dxpl.pdx.osdl.net>
+
+       * Fix compile warnings when building 64bit system since
+         u64 is unsigned long, but format is %llu
+
 2005-01-12  "Catalin(ux aka Dino) BOIE" <util@deuroconsult.ro>
 
        * Add the possibility to use fwmark in u32 filters
index 4df3fb99b49044a13db59d55eb70d20df025dcdf..b29b3a0328a8efbb6f1b6391f8303e335222b497 100644 (file)
@@ -243,7 +243,7 @@ static const char *strxf_limit(__u64 limit)
        if (limit == XFRM_INF)
                strcpy(str, "(INF)");
        else
-               sprintf(str, "%llu", limit);
+               sprintf(str, "%llu", (unsigned long long) limit);
 
        return str;
 }
@@ -323,9 +323,9 @@ void xfrm_lifetime_print(struct xfrm_lifetime_cfg *cfg,
                fprintf(fp, "  ");
                fprintf(fp, "expire add: ");
                fprintf(fp, "soft ");
-               fprintf(fp, "%llu", cfg->soft_add_expires_seconds);
+               fprintf(fp, "%llu", (unsigned long long) cfg->soft_add_expires_seconds);
                fprintf(fp, "(sec), hard ");
-               fprintf(fp, "%llu", cfg->hard_add_expires_seconds);
+               fprintf(fp, "%llu", (unsigned long long) cfg->hard_add_expires_seconds);
                fprintf(fp, "(sec)");
                fprintf(fp, "%s", _SL_);
 
@@ -334,9 +334,9 @@ void xfrm_lifetime_print(struct xfrm_lifetime_cfg *cfg,
                fprintf(fp, "  ");
                fprintf(fp, "expire use: ");
                fprintf(fp, "soft ");
-               fprintf(fp, "%llu", cfg->soft_use_expires_seconds);
+               fprintf(fp, "%llu", (unsigned long long) cfg->soft_use_expires_seconds);
                fprintf(fp, "(sec), hard ");
-               fprintf(fp, "%llu", cfg->hard_use_expires_seconds);
+               fprintf(fp, "%llu", (unsigned long long) cfg->hard_use_expires_seconds);
                fprintf(fp, "(sec)");
                fprintf(fp, "%s", _SL_);
        }
@@ -349,8 +349,8 @@ void xfrm_lifetime_print(struct xfrm_lifetime_cfg *cfg,
                if (prefix)
                        fprintf(fp, prefix);
                fprintf(fp, "  ");
-               fprintf(fp, "%llu(bytes), ", cur->bytes);
-               fprintf(fp, "%llu(packets)", cur->packets);
+               fprintf(fp, "%llu(bytes), ", (unsigned long long) cur->bytes);
+               fprintf(fp, "%llu(packets)", (unsigned long long) cur->packets);
                fprintf(fp, "%s", _SL_);
 
                if (prefix)
index d661f52b3be877bf5f48a5587da83e3bb30be664..1d96d63fb73d6ae0bcbefa950f49ead8730f2715 100644 (file)
@@ -1005,7 +1005,9 @@ static int u32_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __
        }
 
        if (sel && show_stats && NULL != pf)
-               fprintf(f, " (rule hit %llu success %llu)",pf->rcnt,pf->rhit);
+               fprintf(f, " (rule hit %llu success %llu)",
+                       (unsigned long long) pf->rcnt,
+                       (unsigned long long) pf->rhit);
 
        if (tb[TCA_U32_MARK]) {
                struct tc_u32_mark *mark = RTA_DATA(tb[TCA_U32_MARK]);
@@ -1028,7 +1030,8 @@ static int u32_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __
                                        key->offmask ? "nexthdr+" : "",
                                        key->off);
                                if (show_stats && NULL != pf)
-                                       fprintf(f, " (success %lld ) ",pf->kcnts[i]);
+                                       fprintf(f, " (success %lld ) ",
+                                               (unsigned long long) pf->kcnts[i]);
                        }
                }
 
index 774588609595344a492a0eab19c43c10e6ad77b8..021fbb5bad4c0c9d12307a6f4de73976b4cb9112 100644 (file)
@@ -129,9 +129,9 @@ hfsc_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
 
        fprintf(f, " period %u ", st->period);
        if (st->work != 0)
-               fprintf(f, "work %llu bytes ", st->work);
+               fprintf(f, "work %llu bytes ", (unsigned long long) st->work);
        if (st->rtwork != 0)
-               fprintf(f, "rtwork %llu bytes ", st->rtwork);
+               fprintf(f, "rtwork %llu bytes ", (unsigned long long) st->rtwork);
        fprintf(f, "level %u ", st->level);
        fprintf(f, "\n");
 
index 45a35c4f80d6e8894fe4e72f144fbe3bd863e120..2a19e3f11d4159838e8f99d5aca516b46116d534 100644 (file)
@@ -437,7 +437,7 @@ void print_tcstats2_attr(FILE *fp, struct rtattr *rta, char *prefix, struct rtat
                struct gnet_stats_basic bs = {0};
                memcpy(&bs, RTA_DATA(tbs[TCA_STATS_BASIC]), MIN(RTA_PAYLOAD(tbs[TCA_STATS_BASIC]), sizeof(bs)));
                fprintf(fp, "%sSent %llu bytes %u pkt",
-                       prefix, bs.bytes, bs.packets);
+                       prefix, (unsigned long long) bs.bytes, bs.packets);
        }
 
        if (tbs[TCA_STATS_QUEUE]) {