"ip help" wrong output, exit code.
Subsystems (2)
PATCH 1/1 "ip help" wrong output, exit code.
Changed output of "ip help" from standard error to standard output. And Exit is now 0 instead of -1. "ip help|grep bridge" - now gives bridge syntax instead of flooding user with everything from "ip help".
---ip/ip.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
ip/ip.c +0 -0
@@ -56,7 +56,7 @@ static void usage(void) __attribute__((noreturn));
static void usage(void)
{
-fprintf(stderr,
+fprintf(stdout,
"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
" ip [ -force ] -batch filename\n"
"where OBJECT := { address | addrlabel | fou | help | ila | ioam | l2tp | link |\n" @@ -72,7 +72,7 @@ static void usage(void)
" -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |\n" " -rc[vbuf] [size] | -n[etns] name | -N[umeric] | -a[ll] |\n" " -c[olor]}\n");
-exit(-1);
+exit(0);
}
static int do_help(int argc, char **argv)
Signature · 1 line
2.53.0