* [PATCH iproute2-next] "ip help" wrong output, exit code.
@ 2026-06-21 21:56 Dmitri Seletski
0 siblings, 0 replies; only message in thread
From: Dmitri Seletski @ 2026-06-21 21:56 UTC (permalink / raw)
To: netdev
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(-)
diff --git a/ip/ip.c b/ip/ip.c
index e4b71bde..4627b61c 100644
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -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)
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-21 21:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-21 21:56 [PATCH iproute2-next] "ip help" wrong output, exit code Dmitri Seletski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox