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
|
@ -109,6 +109,7 @@ MP_WEAK int factory_reset_create_filesystem(void) {
|
|||
uint32_t start_tick = HAL_GetTick();
|
||||
|
||||
fs_user_mount_t vfs;
|
||||
vfs.blockdev.flags = 0;
|
||||
pyb_flash_init_vfs(&vfs);
|
||||
uint8_t working_buf[FF_MAX_SS];
|
||||
FRESULT res = f_mkfs(&vfs.fatfs, FM_FAT, 0, working_buf, sizeof(working_buf));
|
||||
|
|
Loading…
Reference in New Issue