fw_env: add redundant env support for MTD_ABSENT

Signed-off-by: Oliver Metz <oliver@freetz.org>
Tested-by: Luka Perkov <luka@openwrt.org>
This commit is contained in:
Oliver Metz 2013-08-30 00:56:01 +02:00 committed by Tom Rini
parent a82ca7bcd7
commit 23ef62d741

3
tools/env/fw_env.c vendored
View file

@ -1136,6 +1136,9 @@ int fw_env_open(void)
} else if (DEVTYPE(dev_current) == MTD_UBIVOLUME &&
DEVTYPE(!dev_current) == MTD_UBIVOLUME) {
environment.flag_scheme = FLAG_INCREMENTAL;
} else if (DEVTYPE(dev_current) == MTD_ABSENT &&
DEVTYPE(!dev_current) == MTD_ABSENT) {
environment.flag_scheme = FLAG_INCREMENTAL;
} else {
fprintf (stderr, "Incompatible flash types!\n");
return -1;