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  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]
Date:   Sat, 26 Dec 2020 09:48:32 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Oliver Hartkopp <socketcan@...tkopp.net>
Cc:     netdev@...r.kernel.org, linux-can@...r.kernel.org
Subject: Re: [PATCH iproute2 5.11 2/2] iplink_can: fix format output for
 details with statistics

On Fri, 25 Dec 2020 20:10:15 +0100
Oliver Hartkopp <socketcan@...tkopp.net> wrote:

> @@ -315,10 +320,12 @@ static void can_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
>  			  "restart_ms",
>  			  "restart-ms %d ",
>  			  *restart_ms);
>  	}
>  
> +	fprintf(f, "\n        ");
> +
That will print in both JSON and non-JSON mode. You don't want to do that.
It also will break in single-line mode.

The iplink_can code has way too many if (is_json_context()) ...
which can lead to differences in output.

Ideally it should have no instances of "fprintf(f, ..."

Powered by blists - more mailing lists