summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-03-28 13:28:41 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-03-28 13:28:41 +0300
commit71d40f132d1fe92624b47de21b17611c9d57011b (patch)
treef87a4805394fd846a297b2f0934c22c0489f29b6
parent9edd736ee62fe1c0b148e1ca7b09175594e25192 (diff)
downloadmicropython-71d40f132d1fe92624b47de21b17611c9d57011b.tar.gz
micropython-71d40f132d1fe92624b47de21b17611c9d57011b.zip
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).
-rw-r--r--esp8266/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/esp8266/main.c b/esp8266/main.c
index 986be3a61c..bd1328ec76 100644
--- a/esp8266/main.c
+++ b/esp8266/main.c
@@ -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");