[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YmZqVw/U7UV8kpNI@nanopsycho>
Date: Mon, 25 Apr 2022 11:31:03 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Shannon Nelson <snelson@...sando.io>, 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
Sat, Apr 23, 2022 at 01:10:54AM CEST, stephen@...workplumber.org wrote:
>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
Changed in v2.
Powered by blists - more mailing lists