From 36c8b143c0c113232bcf47d6499a3982fdfaf98a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Aug 2019 09:46:54 -0600 Subject: env: net: Move eth_parse_enetaddr() to net.c/h This function fits better with the network subsystem, so move it. Signed-off-by: Simon Glass Suggested-by: Joe Hershberger --- cmd/nvedit.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'cmd/nvedit.c') diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 751b77d0e98..01110e9b3a6 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -358,18 +358,6 @@ ulong env_get_hex(const char *varname, ulong default_val) return value; } -void eth_parse_enetaddr(const char *addr, uint8_t *enetaddr) -{ - char *end; - int i; - - for (i = 0; i < 6; ++i) { - enetaddr[i] = addr ? simple_strtoul(addr, &end, 16) : 0; - if (addr) - addr = (*end) ? end + 1 : end; - } -} - int eth_env_get_enetaddr(const char *name, uint8_t *enetaddr) { eth_parse_enetaddr(env_get(name), enetaddr); -- cgit v1.2.3