From: Jiayun Chen <chenjiayunju@gmail.com>
To: netdev@vger.kernel.org
Cc: shemminger@osdl.org, Jiayun Chen <chenjiayunju@gmail.com>
Subject: [PATCH] man: fix doc ip will exit with -1
Date: Tue, 23 Apr 2024 15:03:46 +0800 [thread overview]
Message-ID: <20240423070345.508758-1-chenjiayunju@gmail.com> (raw)
The exit code of -1 (255) is not documented:
$ ip link set dev; echo $?
255
$ ip route help; echo $?
255
It appears that ip returns -1 on syntax error, e.g., invalid device, buffer
size. Here is a patch for documenting this behavior.
Signed-off-by: Jiayun Chen <chenjiayunju@gmail.com>
---
man/man8/ip.8 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/man8/ip.8 b/man/man8/ip.8
index fdae57c5..e7bd9eb4 100644
--- a/man/man8/ip.8
+++ b/man/man8/ip.8
@@ -405,8 +405,8 @@ If this value is 0-6 or 8, chose colors suitable for dark background:
COLORFGBG=";0" ip -c a
.SH EXIT STATUS
-Exit status is 0 if command was successful, and 1 if there is a syntax error.
-If an error was reported by the kernel exit status is 2.
+Exit status is 0 if command was successful, and -1 or 1 if there is a
+syntax error. If an error was reported by the kernel exit status is 2.
.SH "EXAMPLES"
.PP
--
2.34.1
next reply other threads:[~2024-04-23 7:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 7:03 Jiayun Chen [this message]
2024-04-23 15:35 ` [PATCH] man: fix doc ip will exit with -1 Stephen Hemminger
2024-04-24 13:43 ` jiayun chen
2024-04-27 16:42 ` 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=20240423070345.508758-1-chenjiayunju@gmail.com \
--to=chenjiayunju@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.