lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240423070345.508758-1-chenjiayunju@gmail.com>
Date: Tue, 23 Apr 2024 15:03:46 +0800
From: Jiayun Chen <chenjiayunju@...il.com>
To: netdev@...r.kernel.org
Cc: shemminger@...l.org,
	Jiayun Chen <chenjiayunju@...il.com>
Subject: [PATCH] man: fix doc ip will exit with -1

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@...il.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ