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).
This commit is contained in:
parent
9edd736ee6
commit
71d40f132d
@ -48,6 +48,7 @@ STATIC void mp_reset(void) {
|
|||||||
mp_init();
|
mp_init();
|
||||||
mp_obj_list_init(mp_sys_path, 0);
|
mp_obj_list_init(mp_sys_path, 0);
|
||||||
mp_obj_list_init(mp_sys_argv, 0);
|
mp_obj_list_init(mp_sys_argv, 0);
|
||||||
|
memset(MP_STATE_PORT(fs_user_mount), 0, sizeof(MP_STATE_PORT(fs_user_mount)));
|
||||||
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
|
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
|
||||||
#if MICROPY_MODULE_FROZEN
|
#if MICROPY_MODULE_FROZEN
|
||||||
pyexec_frozen_module("boot");
|
pyexec_frozen_module("boot");
|
||||||
|
Loading…
Reference in New Issue
Block a user