[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <EDA0A4495861324DA2618B4C45DCB3EE612E34@blrx3m08.blr.amer.dell.com>
Date: Fri, 13 Aug 2010 18:06:26 +0530
From: <Narendra_K@...l.com>
To: <shemminger@...tta.com>
Cc: <netdev@...r.kernel.org>, <Matt_Domsch@...l.com>,
<Charles_Rose@...l.com>, <Jordan_Hargrave@...l.com>
Subject: RE: [PATCH] Add firmware label support to iproute2
> -----Original Message-----
> From: Stephen Hemminger [mailto:shemminger@...tta.com]
> Sent: Thursday, August 12, 2010 11:43 PM
> To: K, Narendra
> Cc: netdev@...r.kernel.org; Domsch, Matt; Rose, Charles; Hargrave,
> Jordan
> Subject: Re: [PATCH] Add firmware label support to iproute2
>
> On Thu, 12 Aug 2010 12:35:37 -0500
> Narendra K <Narendra_K@...l.com> wrote:
>
> > +#ifndef LIBNETDEVNAME_PRESENT
> > filter_dev = *argv;
> > +#else
> > + if (netdev_alias_to_kernelname(*argv,
kernel_name) <
> 0)
> > + show_firmware_alias_usage(*argv);
> > + filter_dev = kernel_name;
> > +#endif
> > }
>
> like the kernel, I don't like ifdef cases in main code.
> You should put in stub inline that returns appropriate error.
>
Stephen,
Thanks for the suggestions. I will rework the patch and send a revised
version soon.
> What happens if alias matches existing interface name?
If the user inputs an existing 'ethN' name, the function
'netdev_alias_to_kernelaname' will return it as it is. If the user
inputs 'Embedded NIC N', then the function would do a sysfs lookup and
return the corresponding 'ethN' name.
With regards,
Narendra K
--
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