dd98b45d8f34b690c16608f18261ad2abe9d0b5c
[openwrt/staging/dedeckeh.git] / package / boot / uboot-envtools / patches / 110-add-support-for-MTD_ABSENT.patch
1 tools/fw_env: add redundant env support for MTD_ABSENT
2
3 Signed-off-by: Oliver Metz <oliver@freetz.org>
4 ---
5 tools/env/fw_env.c | 3 +++
6 1 file changed, 3 insertions(+)
7
8 --- a/tools/env/fw_env.c
9 +++ b/tools/env/fw_env.c
10 @@ -1164,6 +1164,9 @@ int fw_env_open(void)
11 } else if (DEVTYPE(dev_current) == MTD_UBIVOLUME &&
12 DEVTYPE(!dev_current) == MTD_UBIVOLUME) {
13 environment.flag_scheme = FLAG_INCREMENTAL;
14 + } else if (DEVTYPE(dev_current) == MTD_ABSENT &&
15 + DEVTYPE(!dev_current) == MTD_ABSENT) {
16 + environment.flag_scheme = FLAG_INCREMENTAL;
17 } else {
18 fprintf (stderr, "Incompatible flash types!\n");
19 return -1;