env: Rename environment to embedded_environment
authorSimon Glass <sjg@chromium.org>
Thu, 1 Aug 2019 15:47:03 +0000 (09:47 -0600)
committerTom Rini <trini@konsulko.com>
Sun, 11 Aug 2019 20:43:41 +0000 (16:43 -0400)
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 <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
env/flash.c
include/env_default.h
include/environment.h
tools/envcrc.c

index dca6567a097debbe6bd2611879ffe30d89e0f879..a26d94309d16e880f1fe4830ab1abf966351641c 100644 (file)
@@ -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;
index 86b639d3e28346314370921f4fa72d2214c2b85a..56a8bae39a0a642967af3575a8a437d76549a424 100644 (file)
@@ -10,7 +10,7 @@
 #include <env_callback.h>
 
 #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 */
index d23b92833e45277ba3276b10d3fb7bf33576c42d..44a527e1fa141e9a86e95daa5c6d9a258b9aee8b 100644 (file)
@@ -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[];
index 505949289fa57552dc9e7c09a52836be9dd0ae86..7eb7246d45dc40f23c966f5c20c5b379cfa90df7 100644 (file)
@@ -61,7 +61,7 @@
 #ifdef CONFIG_BUILD_ENVCRC
 # include <environment.h>
 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;