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: <1429218719.3211.119.camel@decadent.org.uk>
Date:	Thu, 16 Apr 2015 22:11:59 +0100
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Sridhar Samudrala <sridhar.samudrala@...el.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] ethtool: return 1 as exit code on a settings(-s)
 failure.

On Thu, 2015-04-16 at 13:55 -0700, Sridhar Samudrala wrote:
> Currently 0 is returned on both success or failure.

Previously discussed here:
<http://thread.gmane.org/gmane.linux.network/349717>.

Ben.

> Signed-off-by: Sridhar Samudrala <sridhar.samudrala@...el.com>
> ---
>  ethtool.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/ethtool.c b/ethtool.c
> index 01b13a6..163dff2 100644
> --- a/ethtool.c
> +++ b/ethtool.c
> @@ -2352,7 +2352,7 @@ static int do_sset(struct cmd_context *ctx)
>  	int argc = ctx->argc;
>  	char **argp = ctx->argp;
>  	int i;
> -	int err;
> +	int err = 0;
>  
>  	for (i = 0; i < ARRAY_SIZE(flags_msglvl); i++)
>  		flag_to_cmdline_info(flags_msglvl[i].name,
> @@ -2665,7 +2665,7 @@ static int do_sset(struct cmd_context *ctx)
>  		}
>  	}
>  
> -	return 0;
> +	return err ? 1 : 0;
>  }
>  
>  static int do_gregs(struct cmd_context *ctx)

-- 
Ben Hutchings
Humour is the best antidote to reality.

Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ