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: Denis Kirjanov <kda@linux-powerpc.org>
This commit is contained in:
parent
1eea5c46ec
commit
9827fa57da
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue