From: Stephen Hemminger <stephen@networkplumber.org>
To: Denis Kirjanov <kda@linux-powerpc.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] iproute: print more verbose error on route cache flush
Date: Mon, 7 Sep 2015 11:10:46 -0700 [thread overview]
Message-ID: <20150907111046.39d459b0@urahara> (raw)
In-Reply-To: <1441438850-4793-1-git-send-email-kda@linux-powerpc.org>
On Sat, 5 Sep 2015 10:40:50 +0300
Denis Kirjanov <kda@linux-powerpc.org> wrote:
> Before:
> kda@vfirst ~/devel/iproute2 $ ./ip/ip route flush cache
> Cannot open "/proc/sys/net/ipv4/route/flush"
>
> After:
> kda@vfirst ~/devel/iproute2/ip $ ./ip route flush cache
> Cannot open "/proc/sys/net/ipv4/route/flush": Permission denied
>
> Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
> ---
> ip/iproute.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ip/iproute.c b/ip/iproute.c
> index 8f49e62..abe4180 100644
> --- a/ip/iproute.c
> +++ b/ip/iproute.c
> @@ -1213,7 +1213,8 @@ static int iproute_flush_cache(void)
> char *buffer = "-1";
>
> if (flush_fd < 0) {
> - fprintf (stderr, "Cannot open \"%s\"\n", ROUTE_FLUSH_PATH);
> + fprintf (stderr, "Cannot open \"%s\": %s\n",
> + ROUTE_FLUSH_PATH, strerror(errno));
> return -1;
> }
>
Sure why not, applied
prev parent reply other threads:[~2015-09-07 18:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-05 7:40 [PATCH] iproute: print more verbose error on route cache flush Denis Kirjanov
2015-09-07 18:10 ` 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=20150907111046.39d459b0@urahara \
--to=stephen@networkplumber.org \
--cc=kda@linux-powerpc.org \
--cc=netdev@vger.kernel.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