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: Wed, 24 Apr 2024 21:43:15 +0800
From: jiayun chen <chenjiayunju@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org, shemminger@...l.org
Subject: Re: [PATCH] man: fix doc ip will exit with -1

But a checker based on the manual doesn't know
what such an undefined value means and how to
handle it.

So I suggest fixing the manual only, not the code.


On Tue, Apr 23, 2024 at 11:35 PM Stephen Hemminger
<stephen@...workplumber.org> wrote:
>
> 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