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]
Date:   Wed, 2 Oct 2019 07:48:04 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Tariq Toukan <tariqt@...lanox.com>
Cc:     David Ahern <dsahern@...il.com>, netdev@...r.kernel.org,
        Moshe Shemesh <moshe@...lanox.com>,
        Aya Levin <ayal@...lanox.com>, Jiri Pirko <jiri@...lanox.com>
Subject: Re: [PATCH V2 iproute2 1/3] devlink: Add helper for left
 justification print

On Wed,  2 Oct 2019 17:35:14 +0300
Tariq Toukan <tariqt@...lanox.com> wrote:

>  static void pr_out_str(struct dl *dl, const char *name, const char *val)
>  {
> -	if (dl->json_output) {
> +	__pr_out_indent_newline(dl);
> +	if (dl->json_output)
>  		jsonw_string_field(dl->jw, name, val);
> -	} else {
> -		if (g_indent_newline)
> -			pr_out("%s %s", name, val);
> -		else
> -			pr_out(" %s %s", name, val);
> -	}
> +	else
> +		pr_out("%s %s", name, val)

Overall this looks like an improvement.

Why doesn't devlink already use existing json_print infrastructure?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ