[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3a849a1f-8073-2650-cdfa-200346010cd2@gmail.com>
Date: Tue, 7 Nov 2017 13:39:56 +0900
From: David Ahern <dsahern@...il.com>
To: stephen@...workplumber.org, netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] libnetlink: Handle extack messages for non-error
case
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.
Powered by blists - more mailing lists