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:
Damien George 2016-03-28 13:28:41 +03:00 committed by Paul Sokolovsky
parent 9edd736ee6
commit 71d40f132d

View File

@ -48,6 +48,7 @@ STATIC void mp_reset(void) {
mp_init();
mp_obj_list_init(mp_sys_path, 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);
#if MICROPY_MODULE_FROZEN
pyexec_frozen_module("boot");