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] [day] [month] [year] [list]
Message-ID: <eb1a82b90e6668207d5ef41897bb4453dfc30bdb.camel@collabora.com>
Date:   Tue, 25 Jan 2022 14:58:52 +0200
From:   Denys Fedoryshchenko <denys.f@...labora.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Michal Kubecek <mkubecek@...e.cz>, netdev@...r.kernel.org
Subject: Re: [PATCH ethtool-next v2] features: add --json support

On Mon, 2022-01-24 at 11:02 -0800, Jakub Kicinski wrote:
> On Mon, 24 Jan 2022 10:06:35 +0200 Denys Fedoryshchenko wrote:
> > +                       if (is_json_context()) {
> > +                               print_bool(PRINT_JSON,
> > off_flag_def[i].long_name, NULL, flag_value);
> > +                       } else {
> 
> Would it make sense to report "fixed" and "requested" as nil for the
> special features? I'm not a high level language expert but otherwise
> generic code handling features will have to test for presence of
> those
> keys before accessing them, no?
I thought about this question for a while, some people prefer to check
for key existence, some prefer to have key, but set null value, and
even all my friends were divided in opinion. 
I think you are right, for a stable schema, I'd better add null values
for missing attributes. I will prepare v3.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ