lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1551012378-29167-3-git-send-email-ayal@mellanox.com> Date: Sun, 24 Feb 2019 14:46:09 +0200 From: Aya Levin <ayal@...lanox.com> To: David Ahern <dsahern@...il.com> Cc: netdev@...r.kernel.org, Jiri Pirko <jiri@...lanox.com>, Moshe Shemesh <moshe@...lanox.com>, Eran Ben Elisha <eranbe@...lanox.com>, Aya Levin <ayal@...lanox.com> Subject: [PATCH v3 iproute2-next 02/11] devlink: Fix print of uint64_t This patch prints uint64_t with its corresponding format and avoid implicit cast to uint32_t. Signed-off-by: Aya Levin <ayal@...lanox.com> Reviewed-by: Moshe Shemesh <moshe@...lanox.com> Acked-by: Jiri Pirko <jiri@...lanox.com> --- devlink/devlink.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/devlink/devlink.c b/devlink/devlink.c index 71bc6239ea0b..b51380298f8a 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -1626,7 +1626,14 @@ static void pr_out_u64(struct dl *dl, const char *name, uint64_t val) if (val == (uint64_t) -1) return pr_out_str(dl, name, "unlimited"); - return pr_out_uint(dl, name, val); + if (dl->json_output) { + jsonw_u64_field(dl->jw, name, val); + } else { + if (g_indent_newline) + pr_out("%s %lu", name, val); + else + pr_out(" %s %lu", name, val); + } } static void pr_out_region_chunk_start(struct dl *dl, uint64_t addr) -- 2.14.1
Powered by blists - more mailing lists