From be54ec1624fb9a31b3fa30d55662d2c7b0832162 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Aug 2019 09:47:03 -0600 Subject: [PATCH] env: Rename environment to embedded_environment The name 'environment' is widely used in U-Boot so is not a very useful name of a variable. Rename it to better indicate its purpose. Signed-off-by: Simon Glass Acked-by: Joe Hershberger Reviewed-by: Simon Goldschmidt --- env/flash.c | 2 +- include/env_default.h | 2 +- include/environment.h | 2 +- tools/envcrc.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/env/flash.c b/env/flash.c index dca6567a09..a26d94309d 100644 --- a/env/flash.c +++ b/env/flash.c @@ -47,7 +47,7 @@ DECLARE_GLOBAL_DATA_PTR; #if defined(CONFIG_ENV_ADDR_REDUND) && defined(CMD_SAVEENV) || \ !defined(CONFIG_ENV_ADDR_REDUND) && defined(INITENV) #ifdef ENV_IS_EMBEDDED -static env_t *env_ptr = &environment; +static env_t *env_ptr = &embedded_environment; #else /* ! ENV_IS_EMBEDDED */ static env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR; diff --git a/include/env_default.h b/include/env_default.h index 86b639d3e2..56a8bae39a 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -10,7 +10,7 @@ #include #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED -env_t environment __UBOOT_ENV_SECTION__(environment) = { +env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = { ENV_CRC, /* CRC Sum */ #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT 1, /* Flags: valid */ diff --git a/include/environment.h b/include/environment.h index d23b92833e..44a527e1fa 100644 --- a/include/environment.h +++ b/include/environment.h @@ -153,7 +153,7 @@ typedef struct environment_s { } env_t; #ifdef ENV_IS_EMBEDDED -extern env_t environment; +extern env_t embedded_environment; #endif /* ENV_IS_EMBEDDED */ extern const unsigned char default_environment[]; diff --git a/tools/envcrc.c b/tools/envcrc.c index 505949289f..7eb7246d45 100644 --- a/tools/envcrc.c +++ b/tools/envcrc.c @@ -61,7 +61,7 @@ #ifdef CONFIG_BUILD_ENVCRC # include extern unsigned int env_size; -extern env_t environment; +extern env_t embedded_environment; #endif /* CONFIG_BUILD_ENVCRC */ extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int); @@ -71,7 +71,7 @@ int main (int argc, char **argv) #ifdef CONFIG_BUILD_ENVCRC unsigned char pad = 0x00; uint32_t crc; - unsigned char *envptr = (unsigned char *)&environment, + unsigned char *envptr = (unsigned char *)&embedded_environment, *dataptr = envptr + ENV_HEADER_SIZE; unsigned int datasize = ENV_SIZE; unsigned int eoe; -- 2.39.5