diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2012-12-11 22:16:37 -0600 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-12-13 11:46:57 -0700 |
commit | 1d6cd0a3f69b549a3fc7e735a045279e7a14947e (patch) | |
tree | 4abb7a50269c09b33e599f291bf6295b863e28e0 /include | |
parent | 9d8d661d7fda6ccda1d5fc31565f207b7648bc6d (diff) | |
download | u-boot-imx-1d6cd0a3f69b549a3fc7e735a045279e7a14947e.zip u-boot-imx-1d6cd0a3f69b549a3fc7e735a045279e7a14947e.tar.gz u-boot-imx-1d6cd0a3f69b549a3fc7e735a045279e7a14947e.tar.bz2 |
env: Handle write-once ethaddr and serial# generically
Use the variable access flags to implement the protection for ethaddr
and serial# instead of hard-coding them.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/env_flags.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/env_flags.h b/include/env_flags.h index 0bdae07..d1aa144 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -53,7 +53,29 @@ enum env_flags_varaccess { #define CONFIG_ENV_FLAGS_LIST_STATIC "" #endif +#ifdef CONFIG_CMD_NET +#ifdef CONFIG_ENV_OVERWRITE +#define ETHADDR_FLAGS "ethaddr:ma," +#else +#ifdef CONFIG_OVERWRITE_ETHADDR_ONCE +#define ETHADDR_FLAGS "ethaddr:mc," +#else +#define ETHADDR_FLAGS "ethaddr:mo," +#endif +#endif +#else +#define ETHADDR_FLAGS "" +#endif + +#ifndef CONFIG_ENV_OVERWRITE +#define SERIAL_FLAGS "serial#:so," +#else +#define SERIAL_FLAGS "" +#endif + #define ENV_FLAGS_LIST_STATIC \ + ETHADDR_FLAGS \ + SERIAL_FLAGS \ CONFIG_ENV_FLAGS_LIST_STATIC #ifdef CONFIG_CMD_ENV_FLAGS |