From: David Ahern <dsahern@gmail.com>
To: stephen@networkplumber.org, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] libnetlink: Handle extack messages for non-error case
Date: Tue, 7 Nov 2017 13:39:56 +0900 [thread overview]
Message-ID: <3a849a1f-8073-2650-cdfa-200346010cd2@gmail.com> (raw)
In-Reply-To: <1510027932-28546-1-git-send-email-dsahern@gmail.com>
On 11/7/17 1:12 PM, David Ahern wrote:
> @@ -101,15 +101,18 @@ static int nl_dump_ext_err(const struct nlmsghdr *nlh, nl_ext_ack_fn_t errfn)
> }
>
> if (errfn)
> - return errfn(errmsg, off, err_nlh);
> + return errfn(msg, off, err_nlh);
>
> - if (errmsg && *errmsg != '\0') {
> - fprintf(stderr, "Error: %s", errmsg);
> - if (errmsg[strlen(errmsg) - 1] != '.')
> + if (msg && *msg != '\0') {
> + bool is_err = (nlh->nlmsg_type == NLMSG_ERROR);
Forgot to update that to:
bool is_err = !!err->error
Please ignore this one; will re-send a v2 later.
prev parent reply other threads:[~2017-11-07 4:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 4:12 [PATCH iproute2] libnetlink: Handle extack messages for non-error case David Ahern
2017-11-07 4:39 ` David Ahern [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=3a849a1f-8073-2650-cdfa-200346010cd2@gmail.com \
--to=dsahern@gmail.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