+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
if (limit == XFRM_INF)
strcpy(str, "(INF)");
else
- sprintf(str, "%llu", limit);
+ sprintf(str, "%llu", (unsigned long long) limit);
return str;
}
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_);
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_);
}
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)
}
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]);
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]);
}
}
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");
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]) {