diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2015-05-20 14:27:22 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-05-21 09:13:20 -0400 |
commit | 73c2bbeea3d09bb8c81adc8769fc53493b6c0351 (patch) | |
tree | e020d78e9a707bee28af09d3a009a382b7a6e132 /include/env_flags.h | |
parent | 94b467b14ed908c89a0780256e89b375aa3cf3ef (diff) | |
download | u-boot-73c2bbeea3d09bb8c81adc8769fc53493b6c0351.zip u-boot-73c2bbeea3d09bb8c81adc8769fc53493b6c0351.tar.gz u-boot-73c2bbeea3d09bb8c81adc8769fc53493b6c0351.tar.bz2 |
net: Apply default format rules to all ethaddr
Use a regular expression to apply the default formatting flags for all
ethaddr env vars.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/env_flags.h')
-rw-r--r-- | include/env_flags.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/env_flags.h b/include/env_flags.h index 3ef6311..fc6d0d8 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -38,13 +38,18 @@ enum env_flags_varaccess { #endif #ifdef CONFIG_CMD_NET +#ifdef CONFIG_REGEX +#define ETHADDR_WILDCARD "\\d?" +#else +#define ETHADDR_WILDCARD +#endif #ifdef CONFIG_ENV_OVERWRITE -#define ETHADDR_FLAGS "ethaddr:ma," +#define ETHADDR_FLAGS "eth" ETHADDR_WILDCARD "addr:ma," #else #ifdef CONFIG_OVERWRITE_ETHADDR_ONCE -#define ETHADDR_FLAGS "ethaddr:mc," +#define ETHADDR_FLAGS "eth" ETHADDR_WILDCARD "addr:mc," #else -#define ETHADDR_FLAGS "ethaddr:mo," +#define ETHADDR_FLAGS "eth" ETHADDR_WILDCARD "addr:mo," #endif #endif #else |