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]
Message-ID: <20130117075115.731c4cf0@nehalam.linuxnetplumber.net>
Date:	Thu, 17 Jan 2013 07:51:15 -0800
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Jiri Pirko <jiri@...nulli.us>
Cc:	netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [patch net-next] team: do not use -ENOENT

On Thu, 17 Jan 2013 11:25:00 +0100
Jiri Pirko <jiri@...nulli.us> wrote:

> Since this error code means "No such file or directory", change this
> value in team driver to ones which make more sense.
> 
> Signed-off-by: Jiri Pirko <jiri@...nulli.us>
> ---
>  drivers/net/team/team.c                   | 4 ++--
>  drivers/net/team/team_mode_activebackup.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
> index 70d5d6b..3d7cf6e 100644
> --- a/drivers/net/team/team.c
> +++ b/drivers/net/team/team.c
> @@ -1128,7 +1128,7 @@ static int team_port_del(struct team *team, struct net_device *port_dev)
>  	if (!port || !team_port_find(team, port)) {
>  		netdev_err(dev, "Device %s does not act as a port of this team\n",
>  			   portname);
> -		return -ENOENT;
> +		return -ENODEV;
>  	}
>  
>  	__team_option_inst_mark_removed_port(team, port);
> @@ -2320,7 +2320,7 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info)
>  			list_add(&opt_inst->tmp_list, &opt_inst_list);
>  		}
>  		if (!opt_found) {
> -			err = -ENOENT;
> +			err = -EINVAL;
>  			goto team_put;
>  		}
>  	}
> diff --git a/drivers/net/team/team_mode_activebackup.c b/drivers/net/team/team_mode_activebackup.c
> index 6262b4d..2792e13 100644
> --- a/drivers/net/team/team_mode_activebackup.c
> +++ b/drivers/net/team/team_mode_activebackup.c
> @@ -81,7 +81,7 @@ static int ab_active_port_set(struct team *team, struct team_gsetter_ctx *ctx)
>  			return 0;
>  		}
>  	}
> -	return -ENOENT;
> +	return -ENODEV;
>  }
>  
>  static const struct team_option ab_options[] = {

To be pedantic.
Changing errno's means effectively changing the ABI.
Linus has already rejected similar patches in other areas.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ