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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<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

Powered by Openwall GNU/*/Linux Powered by OpenVZ