diff options
author | Damien George <damien.p.george@gmail.com> | 2016-10-07 14:09:59 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-10-07 14:09:59 +1100 |
commit | 016dba0e988352015bcbf43ec84f3b67e2244dc4 (patch) | |
tree | 466edac8f50a8e1d0ee025c243860e0359e388e4 /unix/modos.c | |
parent | 503089ea9d6b358f1a06ad1f164561b7cf11c742 (diff) |
unix: Use common RAISE_ERRNO macro from mphalport.h.
Diffstat (limited to 'unix/modos.c')
-rw-r--r-- | unix/modos.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/unix/modos.c b/unix/modos.c index b29805269..36945720d 100644 --- a/unix/modos.c +++ b/unix/modos.c @@ -37,6 +37,7 @@ #include "py/nlr.h" #include "py/runtime.h" #include "py/objtuple.h" +#include "py/mphal.h" #include "extmod/misc.h" // Can't include this, as FATFS structure definition is required, @@ -51,10 +52,6 @@ extern const mp_obj_type_t mp_fat_vfs_type; #define USE_STATFS 1 #endif -#define RAISE_ERRNO(err_flag, error_val) \ - { if (err_flag == -1) \ - { mp_raise_OSError(error_val); } } - STATIC mp_obj_t mod_os_stat(mp_obj_t path_in) { struct stat sb; mp_uint_t len; |