Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ static int mount_ubi(struct mtd_info *mtd, bool create)
if (ret)
return ret;

ubi_exit();
ubi_detach();
ret = ubi_part(mtd->name, NULL);
}

Expand Down Expand Up @@ -657,7 +657,7 @@ static int write_ubi_fit_image(const void *data, size_t size,

if (!ubi_find_volume(PART_FIT_NAME) && !ubi_find_volume(PART_FIP_NAME)) {
/* ubi is dirty, erase ubi and recreate volumes */
ubi_exit();
ubi_detach();
ret = mtd_erase_skip_bad(mtd, 0, mtd->size, mtd->size, NULL, NULL, false);
if (ret)
return ret;
Expand Down
2 changes: 1 addition & 1 deletion uboot-mtk-20230718-09eda825/cmd/ubi.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ static int ubi_set_skip_check(char *volume, bool skip_check)
return ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec);
}

static int ubi_detach(void)
int ubi_detach(void)
{
#ifdef CONFIG_CMD_UBIFS
/*
Expand Down
1 change: 1 addition & 0 deletions uboot-mtk-20230718-09eda825/include/ubi_uboot.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ extern int ubi_remove_vol(char *volume);
extern struct ubi_device *ubi_devices[];
int cmd_ubifs_mount(char *vol_name);
int cmd_ubifs_umount(void);
int ubi_detach(void);

#endif