diff options
Diffstat (limited to 'extmod/fsusermount.h')
-rw-r--r-- | extmod/fsusermount.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/extmod/fsusermount.h b/extmod/fsusermount.h index c141ecb99a..53442a3689 100644 --- a/extmod/fsusermount.h +++ b/extmod/fsusermount.h @@ -29,8 +29,15 @@ typedef struct _fs_user_mount_t { mp_uint_t len; mp_obj_t readblocks[4]; mp_obj_t writeblocks[4]; - mp_obj_t sync[2]; - mp_obj_t count[2]; + // new protocol uses just ioctl, old uses sync (optional) and count + // if ioctl[3]=count[1]=MP_OBJ_SENTINEL then we have the new protocol, else old + union { + mp_obj_t ioctl[4]; + struct { + mp_obj_t sync[2]; + mp_obj_t count[2]; + } old; + } u; FATFS fatfs; } fs_user_mount_t; |