[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220425090941.326d8ec8@hermes.local>
Date: Mon, 25 Apr 2022 09:09:41 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, sthemmin@...rosoft.com, dsahern@...il.com,
snelson@...sando.io
Subject: Re: [patch iproute2-next v2] devlink: introduce -h[ex] cmdline
option to allow dumping numbers in hex format
On Mon, 25 Apr 2022 11:30:36 +0200
Jiri Pirko <jiri@...nulli.us> wrote:
> static int fmsg_value_show(struct dl *dl, int type, struct nlattr *nl_data)
> {
> + const char *num_fmt = dl->hex ? "%#x" : "%u";
> + const char *num64_fmt = dl->hex ? "%#"PRIx64 : "%"PRIu64;
This is going to make it harder if/when format string properties are used.
Not sure what the better way is.
Powered by blists - more mailing lists