From 203e94f6c9ca03e260175ce240f5856507395585 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 3 Aug 2017 12:21:56 -0600 Subject: 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 Reviewed-by: Tom Rini --- include/environment.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/environment.h') diff --git a/include/environment.h b/include/environment.h index 5f2064bf23..ad2331c90b 100644 --- a/include/environment.h +++ b/include/environment.h @@ -197,6 +197,13 @@ extern uint mmc_get_env_part(struct mmc *mmc); #include #include +/* Value for environment validity */ +enum env_valid { + ENV_INVALID, /* No valid environment */ + ENV_VALID, /* First or only environment is valid */ + ENV_REDUND, /* Redundant environment is valid */ +}; + extern struct hsearch_data env_htab; /* Function that returns a character from the environment */ -- cgit