diff options
| author | Damien George <damien@micropython.org> | 2022-03-09 12:32:44 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-03-09 21:13:57 +1100 |
| commit | 2b409ef8a46015f8f3bd20bc44e644637dbe9bd3 (patch) | |
| tree | a28650be47592a6b75047b74095d7d74006d1e15 /ports/unix/modusocket.c | |
| parent | ade2720e55e5960f6667d952c4482a369747e3a4 (diff) | |
unix/moduos: Convert module to use extmod version.
All variants now use extmod/moduos.c as their uos module implementation.
In particular this means they all have MICROPY_VFS enabled and use VfsPosix
for their filesystem.
As part of this, the available functions in uos become more consistent with
other ports:
- coverage variant gets uos.urandom
- minimal and standard variant get: unlink, chdir, getcwd, listdir
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/unix/modusocket.c')
| -rw-r--r-- | ports/unix/modusocket.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ports/unix/modusocket.c b/ports/unix/modusocket.c index 951cb7a21..efa182e39 100644 --- a/ports/unix/modusocket.c +++ b/ports/unix/modusocket.c @@ -46,6 +46,7 @@ #include "py/builtin.h" #include "py/mphal.h" #include "py/mpthread.h" +#include "extmod/vfs.h" #include <poll.h> /* @@ -445,7 +446,7 @@ STATIC mp_obj_t socket_makefile(size_t n_args, const mp_obj_t *args) { mp_obj_t *new_args = alloca(n_args * sizeof(mp_obj_t)); memcpy(new_args + 1, args + 1, (n_args - 1) * sizeof(mp_obj_t)); new_args[0] = MP_OBJ_NEW_SMALL_INT(self->fd); - return mp_builtin_open(n_args, new_args, (mp_map_t *)&mp_const_empty_map); + return mp_vfs_open(n_args, new_args, (mp_map_t *)&mp_const_empty_map); } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socket_makefile_obj, 1, 3, socket_makefile); |
