Re: [PATCH V2 iproute2 1/3] devlink: Add helper for left justification print

2019-10-02 Thread Jiri Pirko
Wed, Oct 02, 2019 at 04:48:04PM CEST, step...@networkplumber.org wrote: >On Wed, 2 Oct 2019 17:35:14 +0300 >Tariq Toukan 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->

Re: [PATCH V2 iproute2 1/3] devlink: Add helper for left justification print

2019-10-02 Thread Stephen Hemminger
On Wed, 2 Oct 2019 17:35:14 +0300 Tariq Toukan 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); > - }

[PATCH V2 iproute2 1/3] devlink: Add helper for left justification print

2019-10-02 Thread Tariq Toukan
From: Aya Levin Introduce a helper function which wraps code that adds a left hand side space separator unless it follows a newline. Fixes: e3d0f0c0e3d8 ("devlink: add option to generate JSON output") Signed-off-by: Aya Levin Acked-by: Jiri Pirko Signed-off-by: Tariq Toukan --- devlink/devli