diff options
author | Damien George <damien.p.george@gmail.com> | 2017-01-29 15:26:24 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-01-30 12:26:07 +1100 |
commit | 0bd61d23b9b21819da9d10290dfccd4ae4a69e1a (patch) | |
tree | c4b415d9cdebdc10539c3b6a1eb61ed47596712a /extmod/vfs_fat_file.c | |
parent | 95635ade8b8b848554e577250256145d65de9608 (diff) |
extmod/vfs_fat: Remove MICROPY_FATFS_OO config option.
Everyone should now be using the new ooFatFs library. The old one is no
longer supported and will be removed.
Diffstat (limited to 'extmod/vfs_fat_file.c')
-rw-r--r-- | extmod/vfs_fat_file.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c index dccd12035..bb5903575 100644 --- a/extmod/vfs_fat_file.c +++ b/extmod/vfs_fat_file.c @@ -34,11 +34,7 @@ #include "py/runtime.h" #include "py/stream.h" #include "py/mperrno.h" -#if MICROPY_FATFS_OO #include "lib/oofatfs/ff.h" -#else -#include "lib/fatfs/ff.h" -#endif #include "extmod/fsusermount.h" #include "extmod/vfs_fat.h" @@ -115,11 +111,7 @@ STATIC mp_uint_t file_obj_write(mp_obj_t self_in, const void *buf, mp_uint_t siz STATIC mp_obj_t file_obj_close(mp_obj_t self_in) { pyb_file_obj_t *self = MP_OBJ_TO_PTR(self_in); // if fs==NULL then the file is closed and in that case this method is a no-op - #if MICROPY_FATFS_OO if (self->fp.obj.fs != NULL) { - #else - if (self->fp.fs != NULL) { - #endif FRESULT res = f_close(&self->fp); if (res != FR_OK) { mp_raise_OSError(fresult_to_errno_table[res]); @@ -221,13 +213,8 @@ STATIC mp_obj_t file_open(fs_user_mount_t *vfs, const mp_obj_type_t *type, mp_ar o->base.type = type; const char *fname = mp_obj_str_get_str(args[0].u_obj); - #if MICROPY_FATFS_OO assert(vfs != NULL); FRESULT res = f_open(&vfs->fatfs, &o->fp, fname, mode); - #else - (void)vfs; - FRESULT res = f_open(&o->fp, fname, mode); - #endif if (res != FR_OK) { m_del_obj(pyb_file_obj_t, o); mp_raise_OSError(fresult_to_errno_table[res]); |