From: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
To: cake@lists.bufferbloat.net
Cc: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Subject: [Cake] [PATCH 1/2] cake: print_uint format fixes
Date: Sun, 11 Mar 2018 09:19:29 +0000 [thread overview]
Message-ID: <20180311091930.86264-2-ldir@darbyshire-bryant.me.uk> (raw)
In-Reply-To: <20180311091930.86264-1-ldir@darbyshire-bryant.me.uk>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
---
tc/q_cake.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/tc/q_cake.c b/tc/q_cake.c
index 44cadb63..f888bd2a 100644
--- a/tc/q_cake.c
+++ b/tc/q_cake.c
@@ -47,6 +47,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
+#include <inttypes.h>
#include "utils.h"
#include "tc_util.h"
@@ -557,10 +558,10 @@ static int cake_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
else if (!raw)
print_string(PRINT_ANY, "atm", "%s ", "noatm");
- print_uint(PRINT_ANY, "overhead", "overhead %d ", overhead);
+ print_uint(PRINT_ANY, "overhead", "overhead %" PRId64 " ", overhead);
if (mpu)
- print_uint(PRINT_ANY, "mpu", "mpu %d ", mpu);
+ print_uint(PRINT_ANY, "mpu", "mpu %" PRIu64 " ", mpu);
if (memlimit) {
print_uint(PRINT_JSON, "memlimit", NULL, memlimit);
@@ -631,13 +632,13 @@ static int cake_print_xstats(struct qdisc_util *qu, FILE *f,
print_string(PRINT_FP, NULL, " capacity estimate: %s\n",
sprint_rate(stnc->capacity_estimate, b1));
- print_uint(PRINT_ANY, "min_transport_size", " min/max transport layer size: %10u",
+ print_uint(PRINT_ANY, "min_transport_size", " min/max transport layer size: %10" PRIu64,
stnc->min_trnlen);
- print_uint(PRINT_ANY, "max_transport_size", " /%8u\n", stnc->max_trnlen);
- print_uint(PRINT_ANY, "min_adj_size", " min/max overhead-adjusted size: %8u",
+ print_uint(PRINT_ANY, "max_transport_size", " /%8" PRIu64 "\n", stnc->max_trnlen);
+ print_uint(PRINT_ANY, "min_adj_size", " min/max overhead-adjusted size: %8" PRIu64,
stnc->min_adjlen);
- print_uint(PRINT_ANY, "max_adj_size", " /%8u\n", stnc->max_adjlen);
- print_uint(PRINT_ANY, "avg_hdr_offset", " average transport hdr offset: %10u\n\n",
+ print_uint(PRINT_ANY, "max_adj_size", " /%8" PRIu64 "\n", stnc->max_adjlen);
+ print_uint(PRINT_ANY, "avg_hdr_offset", " average transport hdr offset: %10" PRIu64 "\n\n",
stnc->avg_trnoff);
if (is_json_context()) {
--
2.14.3 (Apple Git-98)
next prev parent reply other threads:[~2018-03-11 9:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-11 9:19 [Cake] fixing tc cake output since json-ification Kevin Darbyshire-Bryant
2018-03-11 9:19 ` Kevin Darbyshire-Bryant [this message]
2018-03-11 20:49 ` [Cake] [PATCH 1/2] cake: print_uint format fixes Toke Høiland-Jørgensen
2018-03-11 22:10 ` Kevin Darbyshire-Bryant
2018-03-11 23:34 ` Stephen Hemminger
2018-03-12 9:28 ` Kevin Darbyshire-Bryant
2018-03-12 9:56 ` Toke Høiland-Jørgensen
2018-03-12 15:11 ` Stephen Hemminger
2018-03-12 15:38 ` Toke Høiland-Jørgensen
2018-03-12 21:44 ` Kevin Darbyshire-Bryant
2018-03-16 8:02 ` Kevin Darbyshire-Bryant
2018-03-17 14:33 ` Toke Høiland-Jørgensen
2018-03-11 9:19 ` [Cake] [PATCH 2/2] tc " Kevin Darbyshire-Bryant
2018-03-11 20:50 ` Toke Høiland-Jørgensen
2018-03-11 20:57 ` Kevin Darbyshire-Bryant
2018-03-11 21:22 ` Toke Høiland-Jørgensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180311091930.86264-2-ldir@darbyshire-bryant.me.uk \
--to=ldir@darbyshire-bryant.me.uk \
--cc=cake@lists.bufferbloat.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox