From 18304f7675e84252965b4e24cba279071f1da472 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 24 Jul 2009 17:51:27 -0400 Subject: env: kill off default_environment_size The only environment type that uses this variable is spi flash, and that is only because it is reimplementing the common set_default_env() function. So fix the spi flash code and kill off the default_environment_size in the process. Signed-off-by: Mike Frysinger --- common/env_sf.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'common/env_sf.c') diff --git a/common/env_sf.c b/common/env_sf.c index 2f52e2561b..6575b6da39 100644 --- a/common/env_sf.c +++ b/common/env_sf.c @@ -47,7 +47,6 @@ DECLARE_GLOBAL_DATA_PTR; /* references to names in env_common.c */ extern uchar default_environment[]; -extern int default_environment_size; char * env_name_spec = "SPI Flash"; env_t *env_ptr; @@ -143,16 +142,7 @@ err_probe: err_crc: puts("*** Warning - bad CRC, using default environment\n\n"); - if (default_environment_size > CONFIG_ENV_SIZE) { - gd->env_valid = 0; - puts("*** Error - default environment is too large\n\n"); - return; - } - - memset(env_ptr, 0, sizeof(env_t)); - memcpy(env_ptr->data, default_environment, default_environment_size); - env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE); - gd->env_valid = 1; + set_default_env(); } int env_init(void) -- cgit