From 8d82b0edbd38cd6019ec1c55dbc886c9058be7d4 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 6 Jun 2018 13:11:33 +1000 Subject: extmod: Add VfsPosix filesystem component. This VFS component allows to mount a host POSIX filesystem within the uPy VFS sub-system. All traditional POSIX file access then goes through the VFS, allowing to sandbox a uPy process to a certain sub-dir of the host system, as well as mount other filesystem types alongside the host filesystem. --- py/mpconfig.h | 5 +++++ py/py.mk | 2 ++ 2 files changed, 7 insertions(+) (limited to 'py') diff --git a/py/mpconfig.h b/py/mpconfig.h index 100e2a981..dc0fc5d40 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -681,6 +681,11 @@ typedef double mp_float_t; #define MICROPY_VFS (0) #endif +// Support for VFS POSIX component, to mount a POSIX filesystem within VFS +#ifndef MICROPY_VFS +#define MICROPY_VFS_POSIX (0) +#endif + /*****************************************************************************/ /* Fine control over Python builtins, classes, modules, etc */ diff --git a/py/py.mk b/py/py.mk index a91813526..f4b62a88a 100644 --- a/py/py.mk +++ b/py/py.mk @@ -241,6 +241,8 @@ PY_EXTMOD_O_BASENAME = \ extmod/modframebuf.o \ extmod/vfs.o \ extmod/vfs_reader.o \ + extmod/vfs_posix.o \ + extmod/vfs_posix_file.o \ extmod/vfs_fat.o \ extmod/vfs_fat_diskio.o \ extmod/vfs_fat_file.o \ -- cgit v1.2.3