public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net: warn about spaces in device names
@ 2010-06-10  2:10 Mike Frysinger
  2010-06-21  6:05 ` Ben Warren
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2010-06-10  2:10 UTC (permalink / raw)
  To: u-boot

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 <vapier@gentoo.org>
---
 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)) {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-21  6:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-10  2:10 [U-Boot] [PATCH] net: warn about spaces in device names Mike Frysinger
2010-06-21  6:05 ` Ben Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox