Commit 9827fa57 authored by Denis Kirjanov's avatar Denis Kirjanov Committed by Stephen Hemminger

iproute: print more verbose error on route cache flush

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: default avatarDenis Kirjanov <kda@linux-powerpc.org>
parent 1eea5c46
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment