diff options
author | Codrin Ciubotariu <codrin.ciubotariu@freescale.com> | 2015-09-09 18:00:51 +0300 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2015-09-21 08:29:47 -0700 |
commit | 0118e83ba4e1811515dc944a826758cad8a394b7 (patch) | |
tree | 6231b27301056b7507bf17afc85b5570d2d5d559 /include/env_flags.h | |
parent | 68c929da6bf754ace639b2159e2d5b9e22323aaa (diff) | |
download | u-boot-0118e83ba4e1811515dc944a826758cad8a394b7.tar.gz |
common/env_flags.c: Add function to validate a MAC address
The code that checks if a string has the format of a MAC address has been
moved to a separate function called eth_validate_ethaddr_str().
This has been done to allow other components (such as vsc9953 driver)
to validate a MAC address.
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'include/env_flags.h')
-rw-r--r-- | include/env_flags.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/env_flags.h b/include/env_flags.h index 2d2de88fc0..8823fb9602 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -109,6 +109,13 @@ enum env_flags_varaccess env_flags_parse_varaccess(const char *flags); */ enum env_flags_varaccess env_flags_parse_varaccess_from_binflags(int binflags); +#ifdef CONFIG_CMD_NET +/* + * Check if a string has the format of an Ethernet MAC address + */ +int eth_validate_ethaddr_str(const char *addr); +#endif + #ifdef USE_HOSTCC /* * Look up the type of a variable directly from the .flags var. |