From d3716dd64bb8bb4c4ba2d19bac164d24ada72a68 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Aug 2019 09:47:08 -0600 Subject: env: Rename the redundancy flags Add an ENV prefix to these two flags so that it is clear what they relate to. Also move them to env.h since they are part of the public API. Use an enum rather than a #define to tie them together. Signed-off-by: Simon Glass --- env/sf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'env/sf.c') diff --git a/env/sf.c b/env/sf.c index 5531293e05..09646e1eed 100644 --- a/env/sf.c +++ b/env/sf.c @@ -30,8 +30,6 @@ static ulong env_offset = CONFIG_ENV_OFFSET; static ulong env_new_offset = CONFIG_ENV_OFFSET_REDUND; #endif -#define ACTIVE_FLAG 1 -#define OBSOLETE_FLAG 0 #endif /* CONFIG_ENV_OFFSET_REDUND */ DECLARE_GLOBAL_DATA_PTR; @@ -74,7 +72,7 @@ static int setup_flash_device(void) static int env_sf_save(void) { env_t env_new; - char *saved_buffer = NULL, flag = OBSOLETE_FLAG; + char *saved_buffer = NULL, flag = ENV_REDUND_OBSOLETE; u32 saved_size, saved_offset, sector; int ret; @@ -85,7 +83,7 @@ static int env_sf_save(void) ret = env_export(&env_new); if (ret) return -EIO; - env_new.flags = ACTIVE_FLAG; + env_new.flags = ENV_REDUND_ACTIVE; if (gd->env_valid == ENV_VALID) { env_new_offset = CONFIG_ENV_OFFSET_REDUND; -- cgit