[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220422161054.1db3c836@hermes.local>
Date: Fri, 22 Apr 2022 16:10:54 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Shannon Nelson <snelson@...sando.io>
Cc: Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org,
sthemmin@...rosoft.com, dsahern@...il.com
Subject: Re: [patch iproute2-next] devlink: introduce -h[ex] cmdline option
to allow dumping numbers in hex format
On Fri, 22 Apr 2022 14:36:21 -0700
Shannon Nelson <snelson@...sando.io> 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;
>
> Can we get a leading "0x" on these to help identify that they are hex
> digits?
Yes use %#x
Powered by blists - more mailing lists