[procd] fix up the mount options to match what openwrt had before using procd as...
[openwrt.git] / package / boot / uboot-envtools / patches / 003-nor-eraselen.patch
1 --- a/fw_env.c
2 +++ b/fw_env.c
3 @@ -790,7 +790,10 @@ static int flash_write_buf (int dev, int
4         erase_offset = (offset / blocklen) * blocklen;
5  
6         /* Maximum area we may use */
7 -       erase_len = top_of_range - erase_offset;
8 +       if (mtd_type == MTD_NANDFLASH)
9 +               erase_len = top_of_range - erase_offset;
10 +       else
11 +               erase_len = blocklen;
12  
13         blockstart = erase_offset;
14         /* Offset inside a block */