Skip to content

Commit 71d40f1

Browse files
dpgeorgepfalcon
authored andcommitted
esp8266: Zero out fs_user_mount state on (soft) reset.
Otherwise device stays mounted on soft reset and leads to corruption (since block device object is now gone).
1 parent 9edd736 commit 71d40f1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

esp8266/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ STATIC void mp_reset(void) {
4848
mp_init();
4949
mp_obj_list_init(mp_sys_path, 0);
5050
mp_obj_list_init(mp_sys_argv, 0);
51+
memset(MP_STATE_PORT(fs_user_mount), 0, sizeof(MP_STATE_PORT(fs_user_mount)));
5152
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
5253
#if MICROPY_MODULE_FROZEN
5354
pyexec_frozen_module("boot");

0 commit comments

Comments
 (0)