浏览代码

NAND: Fix saving of redundand environment

When redundand environments are used the serial needs
to get increased, otherwise the old one will still be used.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Alexander Holler 14 年之前
父节点
当前提交
920a5dd232
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      common/env_nand.c

+ 1 - 1
common/env_nand.c

@@ -205,7 +205,7 @@ int saveenv(void)
 		return 1;
 	}
 	env_new.crc   = crc32(0, env_new.data, ENV_SIZE);
-	env_new.flags = ACTIVE_FLAG;
+	++env_new.flags; /* increase the serial */
 
 	if(gd->env_valid == 1) {
 		puts("Erasing redundant NAND...\n");