diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:21:56 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-15 08:18:51 -0400 |
commit | 203e94f6c9ca03e260175ce240f5856507395585 (patch) | |
tree | 1b13b0ff87c4117e18e6ee7db97e09c541724b69 /env/onenand.c | |
parent | 75de597d2d91b1102584d4b641daf592d894207e (diff) | |
download | u-boot-203e94f6c9ca03e260175ce240f5856507395585.tar.gz u-boot-203e94f6c9ca03e260175ce240f5856507395585.tar.bz2 u-boot-203e94f6c9ca03e260175ce240f5856507395585.zip |
env: Add an enum for environment state
At present we have three states for the environment, numbered 0, 1 and 2.
Add an enum to record this to avoid open-coded values.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'env/onenand.c')
-rw-r--r-- | env/onenand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/env/onenand.c b/env/onenand.c index cc3d670de8..d7ad45a0e5 100644 --- a/env/onenand.c +++ b/env/onenand.c @@ -60,7 +60,7 @@ void env_relocate_spec(void) rc = env_import(buf, 1); if (rc) - gd->env_valid = 1; + gd->env_valid = ENV_VALID; } int saveenv(void) @@ -110,7 +110,7 @@ int env_init(void) { /* use default */ gd->env_addr = (ulong)&default_environment[0]; - gd->env_valid = 1; + gd->env_valid = ENV_VALID; return 0; } |