netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roi Dayan <roid@mellanox.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>, Jiri Pirko <jiri@mellanox.com>,
	Eli Britstein <elibr@mellanox.com>
Subject: Re: [PATCH iproute2 1/5] tc_util: introduce a function to print JSON/non-JSON masked numbers
Date: Thu, 14 Nov 2019 09:38:02 +0000	[thread overview]
Message-ID: <129e2006-c3ef-fa3e-847d-a6e2e74eaa96@mellanox.com> (raw)
In-Reply-To: <20191113092005.23695425@shemminger-XPS-13-9360>



On 2019-11-13 7:20 PM, Stephen Hemminger wrote:
> On Wed, 13 Nov 2019 12:12:41 +0200
> Roi Dayan <roid@mellanox.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.

  reply	other threads:[~2019-11-14  9:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 10:12 [PATCH iproute2 0/5] fix json output for tos and ttl Roi Dayan
2019-11-13 10:12 ` [PATCH iproute2 1/5] tc_util: introduce a function to print JSON/non-JSON masked numbers Roi Dayan
2019-11-13 17:18   ` Stephen Hemminger
2019-11-14  8:24     ` Roi Dayan
2019-11-13 17:20   ` Stephen Hemminger
2019-11-14  9:38     ` Roi Dayan [this message]
2019-11-13 10:12 ` [PATCH iproute2 2/5] tc_util: add an option to print masked numbers with/without a newline Roi Dayan
2019-11-13 10:12 ` [PATCH iproute2 3/5] tc: flower: fix newline prints for ct-mark and ct-zone Roi Dayan
2019-11-13 10:12 ` [PATCH iproute2 4/5] tc_util: fix JSON " Roi Dayan
2019-11-13 10:12 ` [PATCH iproute2 5/5] tc: flower: fix output for ip tos and ttl Roi Dayan
2019-11-13 10:16 ` [PATCH iproute2 0/5] fix json output for " Roi Dayan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=129e2006-c3ef-fa3e-847d-a6e2e74eaa96@mellanox.com \
    --to=roid@mellanox.com \
    --cc=dsahern@gmail.com \
    --cc=elibr@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).