diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-10-18 00:45:31 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-10-18 01:21:23 +0300 |
commit | c3000b6f6934bdd2a9b672e8caca6c24c216cc64 (patch) | |
tree | a13cb31d528dba98b019f6f9b01464cf91a55c62 /unix/mpconfigport.h | |
parent | 6ec6f51326bdf60b3e1ac4b401d616651a74fd20 (diff) | |
download | micropython-c3000b6f6934bdd2a9b672e8caca6c24c216cc64.tar.gz micropython-c3000b6f6934bdd2a9b672e8caca6c24c216cc64.zip |
unix/modos: Add statvfs() function.
Another function (like stat) which is problematic to deal with on ABI level
(FFI), as struct statvfs layout may differ unpredictably between OSes and
even different versions of a same OS. So, implement it in C, returning a
10-element tuple of f_bsize, f_frsize, f_blocks, f_bfree, f_bavail, f_files,
f_ffree, f_favail, f_flag, f_namemax. This is exactly the order described
in Python3 docs, https://docs.python.org/3/library/os.html#os.statvfs
(but note that os.statvfs() should make these values available as
attributes).
Diffstat (limited to 'unix/mpconfigport.h')
-rw-r--r-- | unix/mpconfigport.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index 7deef4fdc7..13cf1e87b8 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -93,6 +93,7 @@ #define MICROPY_STACKLESS (0) #define MICROPY_STACKLESS_STRICT (0) +#define MICROPY_PY_OS_STATVFS (1) #define MICROPY_PY_UCTYPES (1) #define MICROPY_PY_UZLIB (1) #define MICROPY_PY_UJSON (1) |