From: Denis Kirjanov <kda@linux-powerpc.org>
To: stephen@networkplumber.org
Cc: netdev@vger.kernel.org, Denis Kirjanov <kda@linux-powerpc.org>
Subject: [PATCH] iproute: print more verbose error on route cache flush
Date: Sat, 5 Sep 2015 10:40:50 +0300 [thread overview]
Message-ID: <1441438850-4793-1-git-send-email-kda@linux-powerpc.org> (raw)
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;
}
--
2.4.0
next reply other threads:[~2015-09-05 8:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-05 7:40 Denis Kirjanov [this message]
2015-09-07 18:10 ` [PATCH] iproute: print more verbose error on route cache flush Stephen Hemminger
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=1441438850-4793-1-git-send-email-kda@linux-powerpc.org \
--to=kda@linux-powerpc.org \
--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;
as well as URLs for NNTP newsgroup(s).