From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Sun, 20 Jun 2010 23:05:32 -0700 Subject: [U-Boot] [PATCH] net: warn about spaces in device names In-Reply-To: <1276135848-7711-1-git-send-email-vapier@gentoo.org> References: <1276135848-7711-1-git-send-email-vapier@gentoo.org> Message-ID: <4C1F012C.5000000@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Mike, On 6/9/2010 7:10 PM, Mike Frysinger wrote: > Some commands operate on eth device names (like 'mii'), but those cannot > be passed on the command line as one argument. So detect devices like > these and warn about them so someone will fix it. > > Signed-off-by: Mike Frysinger > --- > net/eth.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/net/eth.c b/net/eth.c > index b650a20..40e66e5 100644 > --- a/net/eth.c > +++ b/net/eth.c > @@ -225,6 +225,9 @@ int eth_initialize(bd_t *bis) > puts (" [PRIME]"); > } > > + if (strchr(dev->name, ' ')) > + puts("\nWarning: eth device name has a space!\n"); > + > eth_getenv_enetaddr_by_index(eth_number, env_enetaddr); > > if (memcmp(env_enetaddr, "\0\0\0\0\0\0", 6)) { > Applied to net/next. regards, Ben