ports: Use default VFS config for import_stat and builtin_open.
For ports with MICROPY_VFS and MICROPY_PY_IO enabled their configuration can now be simplified to use the defaults for mp_import_stat and mp_builtin_open. This commit makes no functional change, except for the following minor points: - the built-in "open" is removed from the minimal port (it previously did nothing) - the duplicate built-in "input" is removed from the esp32 port - qemu-arm now delegates to VFS import/open Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -195,22 +195,16 @@ mp_lexer_t *mp_lexer_new_from_file(const char *filename) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !MICROPY_VFS
|
||||
mp_import_stat_t mp_import_stat(const char *path) {
|
||||
#if MICROPY_VFS
|
||||
return mp_vfs_import_stat(path);
|
||||
#else
|
||||
return MP_IMPORT_STAT_NO_EXIST;
|
||||
#endif
|
||||
}
|
||||
|
||||
mp_obj_t mp_builtin_open(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) {
|
||||
#if MICROPY_VFS
|
||||
return mp_vfs_open(n_args, args, kwargs);
|
||||
#else
|
||||
return mp_const_none;
|
||||
#endif
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_KW(mp_builtin_open_obj, 1, mp_builtin_open);
|
||||
#endif
|
||||
|
||||
NORETURN void nlr_jump_fail(void *val) {
|
||||
while (1) {
|
||||
|
||||
Reference in New Issue
Block a user