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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 23 Apr 2024 08:35:48 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Jiayun Chen <chenjiayunju@...il.com>
Cc: netdev@...r.kernel.org, shemminger@...l.org
Subject: Re: [PATCH] man: fix doc ip will exit with -1

On Tue, 23 Apr 2024 15:03:46 +0800
Jiayun Chen <chenjiayunju@...il.com> wrote:

> 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(-)

I wish Alexey had used the semi-standard exit codes from bash.
The convention is to use 2 for incorrect usage.
Probably too late to fix now?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ