size_t start, size_t len,
size_t * retlen, u_char * buf);
-/* info for NAND chips, defined in drivers/nand/nand.c */
-extern nand_info_t nand_info[];
-
/* references to names in env_common.c */
extern uchar default_environment[];
extern int default_environment_size;
int env_init(void)
{
#if defined(ENV_IS_EMBEDDED)
- ulong total;
+ size_t total;
int crc1_ok = 0, crc2_ok = 0;
env_t *tmp_env1, *tmp_env2;
#ifdef CFG_ENV_OFFSET_REDUND
int saveenv(void)
{
- ulong total;
+ size_t total;
int ret = 0;
env_ptr->flags++;
#else /* ! CFG_ENV_OFFSET_REDUND */
int saveenv(void)
{
- ulong total;
+ size_t total;
int ret = 0;
puts ("Erasing Nand...");
void env_relocate_spec (void)
{
#if !defined(ENV_IS_EMBEDDED)
- ulong total;
+ size_t total;
int crc1_ok = 0, crc2_ok = 0;
env_t *tmp_env1, *tmp_env2;
void env_relocate_spec (void)
{
#if !defined(ENV_IS_EMBEDDED)
- ulong total;
+ size_t total;
int ret;
total = CFG_ENV_SIZE;
ret = nand_read(&nand_info[0], CFG_ENV_OFFSET, &total, (u_char*)env_ptr);
- if (ret || total != CFG_ENV_SIZE)
+ if (ret || total != CFG_ENV_SIZE)
return use_default();
if (crc32(0, env_ptr->data, ENV_SIZE) != env_ptr->crc)