diff --git a/extmod/vfs.c b/extmod/vfs.c index 8bcead190d..2799622b38 100644 --- a/extmod/vfs.c +++ b/extmod/vfs.c @@ -547,4 +547,7 @@ int mp_vfs_mount_and_chdir_protected(mp_obj_t bdev, mp_obj_t mount_point) { return ret; } +MP_REGISTER_ROOT_POINTER(struct _mp_vfs_mount_t *vfs_cur); +MP_REGISTER_ROOT_POINTER(struct _mp_vfs_mount_t *vfs_mount_table); + #endif // MICROPY_VFS diff --git a/py/mpstate.h b/py/mpstate.h index 7ad9d6b293..784eff0a26 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -198,11 +198,6 @@ typedef struct _mp_state_vm_t { // root pointers for extmod - #if MICROPY_VFS - struct _mp_vfs_mount_t *vfs_cur; - struct _mp_vfs_mount_t *vfs_mount_table; - #endif - #if MICROPY_PY_BLUETOOTH mp_obj_t bluetooth; #endif