samples/usb/imass: Use flash_area_flatten to wipe storage
The commit replaces flash_area_erase with flash_area_flatten, as it allows to emulate erase and scramble data stored on devices that do not provide erase callback. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit is contained in:
parent
e31b8c8edf
commit
856d7709bb
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ static int setup_flash(struct fs_mount_t *mnt)
|
|||
|
||||
if (rc < 0 && IS_ENABLED(CONFIG_APP_WIPE_STORAGE)) {
|
||||
printk("Erasing flash area ... ");
|
||||
rc = flash_area_erase(pfa, 0, pfa->fa_size);
|
||||
rc = flash_area_flatten(pfa, 0, pfa->fa_size);
|
||||
printk("%d\n", rc);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue