dll: fuse: ioctl

This commit is contained in:
Bill Zissimopoulos
2018-05-07 14:05:18 -07:00
parent 637a1dac7e
commit fbcefe6339
3 changed files with 54 additions and 1 deletions

View File

@ -87,7 +87,7 @@ struct fuse_operations
/* _ */ unsigned int flag_nopath:1;
/* _ */ unsigned int flag_utime_omit_ok:1;
/* _ */ unsigned int flag_reserved:29;
/* _ */ int (*ioctl)(const char *path, int cmd, void *arg, struct fuse_file_info *fi,
/* S */ int (*ioctl)(const char *path, int cmd, void *arg, struct fuse_file_info *fi,
unsigned int flags, void *data);
/* _ */ int (*poll)(const char *path, struct fuse_file_info *fi,
struct fuse_pollhandle *ph, unsigned *reventsp);

View File

@ -53,6 +53,17 @@ extern "C" {
#endif
#endif
#define FSP_FUSE_DEVICE_TYPE (0x8000 | 'W' | 'F' * 0x100) /* DeviceIoControl -> ioctl */
#define FSP_FUSE_CTLCODE_FROM_IOCTL(cmd)\
(FSP_FUSE_DEVICE_TYPE << 16) | (((c) & 0x0fff) << 2)
#define FSP_FUSE_IOCTL(cmd, isiz, osiz) \
( \
(((osiz) != 0) << 31) | \
(((isiz) != 0) << 30) | \
(((isiz) | (osiz)) << 16) | \
(cmd) \
)
/*
* FUSE uses a number of types (notably: struct stat) that are OS specific.
* Furthermore there are sometimes multiple definitions of the same type even