Skip to content
Snippets Groups Projects
Commit 1384f3bb authored by Mike Frysinger's avatar Mike Frysinger Committed by Ben Warren
Browse files

net: warn about spaces in device names


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: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarBen Warren <biggerbadderben@gmail.com>
parent f9abdfe0
No related branches found
No related tags found
No related merge requests found
...@@ -234,6 +234,9 @@ int eth_initialize(bd_t *bis) ...@@ -234,6 +234,9 @@ int eth_initialize(bd_t *bis)
puts (" [PRIME]"); puts (" [PRIME]");
} }
if (strchr(dev->name, ' '))
puts("\nWarning: eth device name has a space!\n");
eth_getenv_enetaddr_by_index(eth_number, env_enetaddr); eth_getenv_enetaddr_by_index(eth_number, env_enetaddr);
if (memcmp(env_enetaddr, "\0\0\0\0\0\0", 6)) { if (memcmp(env_enetaddr, "\0\0\0\0\0\0", 6)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment