diff options
author | Damien George <damien.p.george@gmail.com> | 2018-06-06 13:11:33 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-06-06 14:28:23 +1000 |
commit | 8d82b0edbd38cd6019ec1c55dbc886c9058be7d4 (patch) | |
tree | 1b4425405f64619392a1fc325c30260d974d74c8 /py | |
parent | f35aae366c4fd54a166960f830b4f93608d847cb (diff) |
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.
Diffstat (limited to 'py')
-rw-r--r-- | py/mpconfig.h | 5 | ||||
-rw-r--r-- | py/py.mk | 2 |
2 files changed, 7 insertions, 0 deletions
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 */ @@ -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 \ |