stm32/factoryreset: Init vfs flags before calling pyb_flash_init_vfs.
The vfs flags could have any random value from stack. This bug was
introduced back in 7723dac337
This commit is contained in:
parent
fe9ffff9c0
commit
f9e5b0d93d
1 changed files with 1 additions and 0 deletions
|
|
@ -109,6 +109,7 @@ MP_WEAK int factory_reset_create_filesystem(void) {
|
||||||
uint32_t start_tick = HAL_GetTick();
|
uint32_t start_tick = HAL_GetTick();
|
||||||
|
|
||||||
fs_user_mount_t vfs;
|
fs_user_mount_t vfs;
|
||||||
|
vfs.blockdev.flags = 0;
|
||||||
pyb_flash_init_vfs(&vfs);
|
pyb_flash_init_vfs(&vfs);
|
||||||
uint8_t working_buf[FF_MAX_SS];
|
uint8_t working_buf[FF_MAX_SS];
|
||||||
FRESULT res = f_mkfs(&vfs.fatfs, FM_FAT, 0, working_buf, sizeof(working_buf));
|
FRESULT res = f_mkfs(&vfs.fatfs, FM_FAT, 0, working_buf, sizeof(working_buf));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue