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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221203090052.65ff3bf1@hermes.local>
Date:   Sat, 3 Dec 2022 09:00:52 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Daniel Machon <daniel.machon@...rochip.com>
Cc:     <netdev@...r.kernel.org>, <dsahern@...nel.org>, <petrm@...dia.com>,
        <maxime.chevallier@...tlin.com>, <vladimir.oltean@....com>,
        <UNGLinuxDriver@...rochip.com>
Subject: Re: [PATCH iproute2-next v3 1/2] dcb: add new pcp-prio parameter to
 dcb app

On Fri, 2 Dec 2022 10:22:34 +0100
Daniel Machon <daniel.machon@...rochip.com> wrote:

> +static int dcb_app_print_key_pcp(__u16 protocol)
> +{
> +	/* Print in numerical form, if protocol value is out-of-range */
> +	if (protocol > DCB_APP_PCP_MAX) {
> +		fprintf(stderr, "Unknown PCP key: %d\n", protocol);
> +		return print_uint(PRINT_ANY, NULL, "%d:", protocol);
> +	}
> +
> +	return print_string(PRINT_ANY, NULL, "%s:", pcp_names[protocol]);
> +}

This is not an application friendly way to produce JSON output.
You need to put a key on each one, and value should not contain colon.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ