[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <470F6209.6020708@trash.net>
Date: Fri, 12 Oct 2007 14:01:13 +0200
From: Patrick McHardy <kaber@...sh.net>
To: Andreas Henriksson <andreas@...al.se>
CC: shemminger@...ux-foundation.org, netdev@...r.kernel.org,
Alexander Wirt <formorer@...ian.org>
Subject: Re: [PATCH 03/12] Prevent renaming interfaces to empty string.
Andreas Henriksson wrote:
> From: Alexander Wirt <formorer@...ian.org>
>
>
> Signed-off-by: Andreas Henriksson <andreas@...al.se>
> ---
> ip/iplink.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/ip/iplink.c b/ip/iplink.c
> index 4060845..da1f64e 100644
> --- a/ip/iplink.c
> +++ b/ip/iplink.c
> @@ -670,6 +670,10 @@ static int do_set(int argc, char **argv)
> }
>
> if (newname && strcmp(dev, newname)) {
> + if (strlen(newname) == 0) {
> + printf("\"\" is not valid device identifier\n");
> + return -1;
> + }
Indentation fixed, same change for the non-ioctl case, use invarg.
While I'm at it I also fixed the error message for "name too long",
*argv is NULL at this point.
Signed-off-by: Patrick McHardy <kaber@...sh.net>
View attachment "x" of type "text/plain" (771 bytes)
Powered by blists - more mailing lists