[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240423083548.49573c93@hermes.local>
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