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] [day] [month] [year] [list]
Message-ID: <20240427094217.28b5314c@hermes.local>
Date: Sat, 27 Apr 2024 09:42:17 -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>
> ---

I would rather fix all of iproute2 commands (ip, bridge, tc, devlink, etc)
to follow the conventions used by other Linux utilities of return 2 for errors
in command line arguments. Doing that is unlikely to break any scripts because
a sane script will be checking for exit status of non-zero.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ