From: Stephen Hemminger <stephen@networkplumber.org>
To: Serhey Popovych <serhe.popovych@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2-next] ip: Use single variable to represent -pretty
Date: Thu, 15 Feb 2018 10:58:15 -0800 [thread overview]
Message-ID: <20180215105815.1fe9fed3@xeon-e3> (raw)
In-Reply-To: <1518719493-29333-1-git-send-email-serhe.popovych@gmail.com>
On Thu, 15 Feb 2018 20:31:33 +0200
Serhey Popovych <serhe.popovych@gmail.com> wrote:
> After commit a233caa0aaee ("json: make pretty printing optional") I get
> following build failure:
>
> LINK rtmon
> ../lib/libutil.a(json_print.o): In function `new_json_obj':
> json_print.c:(.text+0x35): undefined reference to `show_pretty'
> collect2: error: ld returned 1 exit status
> make[1]: *** [rtmon] Error 1
> make: *** [all] Error 2
>
> It is caused by missing show_pretty variable in rtmon.
>
> On the other hand tc/tc.c there are two distinct variables and single
> matches() call that handles -pretty option thus setting show_pretty
> will never happen. Note that since commit 44dcfe820185 ("Change
> formatting of u32 back to default") show_pretty is used in tc/f_u32.c
> so this is first place where -pretty introduced.
>
> Furthermore other utilities like misc/ifstat.c and misc/nstat.c define
> pretty variable, however only for their own purposes. They both support
> JSON output and thus depend show_pretty in new_json_obj().
>
> Assuming above use common variable to represent -pretty option, define
> it in utils.c and declare in utils.h that is commonly used. Replace
> show_pretty with pretty.
>
> Fixes: a233caa0aaee ("json: make pretty printing optional")
> Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
> ---
Looks Good to me.
Not sure it did not show up in my builds.
I am fixing bridge to use similar json/color/pretty flags.
prev parent reply other threads:[~2018-02-15 18:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 18:31 [PATCH iproute2-next] ip: Use single variable to represent -pretty Serhey Popovych
2018-02-15 18:58 ` Stephen Hemminger [this message]
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=20180215105815.1fe9fed3@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=netdev@vger.kernel.org \
--cc=serhe.popovych@gmail.com \
/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).