summaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2019-02-14 12:54:34 -0800
committerScott Shawcroft <scott@tannewt.org>2019-02-19 14:50:31 -0800
commit46fd60c70398b51136a2deea84f30e867679ca53 (patch)
treed258a055ea443cb8b0b1879a2905af0eb03a3a35 /py/runtime.c
parent4e75aaecd07ea954aeba5dda59ed3d1b37bfc17d (diff)
Prevent infinite display update recursion and fix VFS mounting
Fixes #1529
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/py/runtime.c b/py/runtime.c
index fb62edf73..060748f1b 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -131,31 +131,6 @@ void mp_init(void) {
sizeof(MP_STATE_VM(fs_user_mount)) - MICROPY_FATFS_NUM_PERSISTENT);
#endif
- #if MICROPY_VFS
- #if MICROPY_FATFS_NUM_PERSISTENT > 0
- // We preserve the last MICROPY_FATFS_NUM_PERSISTENT mounts because newer
- // mounts are put at the front of the list.
- mp_vfs_mount_t *vfs = MP_STATE_VM(vfs_mount_table);
- // Count how many mounts we have.
- uint8_t count = 0;
- while (vfs != NULL) {
- vfs = vfs->next;
- count++;
- }
- // Find the vfs MICROPY_FATFS_NUM_PERSISTENT mounts from the end.
- vfs = MP_STATE_VM(vfs_mount_table);
- for (uint8_t j = 0; j < count - MICROPY_FATFS_NUM_PERSISTENT; j++) {
- vfs = vfs->next;
- }
- MP_STATE_VM(vfs_mount_table) = vfs;
- MP_STATE_VM(vfs_cur) = vfs;
- #else
- // initialise the VFS sub-system
- MP_STATE_VM(vfs_cur) = NULL;
- MP_STATE_VM(vfs_mount_table) = NULL;
- #endif
- #endif
-
#if MICROPY_PY_THREAD_GIL
mp_thread_mutex_init(&MP_STATE_VM(gil_mutex));
#endif