uboot-mtk-20230718-09eda825: fix erase ubi env for legacy mtd bootmenu
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#else
|
||||
#define UBI_VID_OFFSET QUOTE(CONFIG_ENV_UBI_VID_OFFSET)
|
||||
#endif
|
||||
int env_ubi_erase(void);
|
||||
#endif /* CONFIG_ENV_IS_IN_UBI */
|
||||
|
||||
static struct mtd_info *get_mtd_part(const char *partname)
|
||||
@@ -152,7 +153,7 @@ static int erase_env(void *priv, const struct data_part_entry *dpe,
|
||||
if (ubi_part(CONFIG_ENV_UBI_PART, UBI_VID_OFFSET))
|
||||
return -EIO;
|
||||
|
||||
ubi_remove_vol(CONFIG_ENV_UBI_VOLUME);
|
||||
env_ubi_erase();
|
||||
ubi_exit();
|
||||
#else
|
||||
struct mtd_info *mtd;
|
||||
|
||||
Reference in New Issue
Block a user