[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <129e2006-c3ef-fa3e-847d-a6e2e74eaa96@mellanox.com>
Date: Thu, 14 Nov 2019 09:38:02 +0000
From: Roi Dayan <roid@...lanox.com>
To: Stephen Hemminger <stephen@...workplumber.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
David Ahern <dsahern@...il.com>,
Jiri Pirko <jiri@...lanox.com>,
Eli Britstein <elibr@...lanox.com>
Subject: Re: [PATCH iproute2 1/5] tc_util: introduce a function to print
JSON/non-JSON masked numbers
On 2019-11-13 7:20 PM, Stephen Hemminger wrote:
> On Wed, 13 Nov 2019 12:12:41 +0200
> Roi Dayan <roid@...lanox.com> wrote:
>
>> +
>> + if (is_json_context()) {
>> + sprintf(namefrm, "\n %s %%u", name);
>> + print_hu(PRINT_ANY, name, namefrm,
>> + rta_getattr_type(attr));
>> + if (mask != type_max) {
>> + char mask_name[SPRINT_BSIZE-6];
>> +
>> + sprintf(mask_name, "%s_mask", name);
>> + sprintf(namefrm, "\n %s %%u", mask_name);
>> + print_hu(PRINT_ANY, mask_name, namefrm, mask);
>
> Should use _SL_ to handle single line output format case (instead of \n)
>
now i see there are more places using \n instead of _SL_ which breaks
oneline output. not related to this change so i'll prepare fixes for
those later.
thanks.
Powered by blists - more mailing lists