diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2009-06-18 11:11:54 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2009-06-18 11:11:54 +0000 |
commit | ae9bfde712697205ac8809edc431cb7c0bdd484f (patch) | |
tree | 6f05932e39f7b1bfb44452bb09aecaa2826e4f0b /include | |
parent | bc53eddb2f76be3e134aa5ed1814254aa289f898 (diff) | |
download | android_external_fuse-ae9bfde712697205ac8809edc431cb7c0bdd484f.tar.gz android_external_fuse-ae9bfde712697205ac8809edc431cb7c0bdd484f.tar.bz2 android_external_fuse-ae9bfde712697205ac8809edc431cb7c0bdd484f.zip |
CUSE patches from Tejun Heo
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 3 | ||||
-rw-r--r-- | include/fuse_kernel.h | 31 | ||||
-rw-r--r-- | include/fuse_lowlevel.h | 27 |
3 files changed, 54 insertions, 7 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index be2c592..663e164 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -9,7 +9,8 @@ fuseinclude_HEADERS = \ fuse_common_compat.h \ fuse_lowlevel.h \ fuse_lowlevel_compat.h \ - fuse_opt.h + fuse_opt.h \ + cuse_lowlevel.h include_HEADERS = old/fuse.h ulockmgr.h diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h index df558e3..541364f 100644 --- a/include/fuse_kernel.h +++ b/include/fuse_kernel.h @@ -150,6 +150,13 @@ struct fuse_file_lock { #define FUSE_BIG_WRITES (1 << 5) /** + * CUSE INIT request/reply flags + * + * CUSE_UNRESTRICTED_IOCTL: use unrestricted ioctl + */ +#define CUSE_UNRESTRICTED_IOCTL (1 << 0) + +/** * Release flags */ #define FUSE_RELEASE_FLUSH (1 << 0) @@ -239,6 +246,9 @@ enum fuse_opcode { FUSE_DESTROY = 38, FUSE_IOCTL = 39, FUSE_POLL = 40, + + /* CUSE specific operations */ + CUSE_INIT = 4096, }; enum fuse_notify_code { @@ -430,6 +440,27 @@ struct fuse_init_out { __u32 max_write; }; +#define CUSE_INIT_INFO_MAX 4096 + +struct cuse_init_in { + __u32 major; + __u32 minor; + __u32 unused; + __u32 flags; +}; + +struct cuse_init_out { + __u32 major; + __u32 minor; + __u32 unused; + __u32 flags; + __u32 max_read; + __u32 max_write; + __u32 dev_major; /* chardev major */ + __u32 dev_minor; /* chardev minor */ + __u32 spare[10]; +}; + struct fuse_interrupt_in { __u64 unique; }; diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index 54cec8c..5ab2422 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -815,7 +815,7 @@ struct fuse_lowlevel_ops { * * Note: For unrestricted ioctls (not allowed for FUSE * servers), data in and out areas can be discovered by giving - * iovs and setting FUSE_IOCTL_RETRY in *flagsp. For + * iovs and setting FUSE_IOCTL_RETRY in @flags. For * restricted ioctls, kernel prepares in/out data area * according to the information encoded in cmd. * @@ -824,6 +824,7 @@ struct fuse_lowlevel_ops { * Valid replies: * fuse_reply_ioctl_retry * fuse_reply_ioctl + * fuse_reply_ioctl_iov * fuse_reply_err * * @param req request handle @@ -831,14 +832,14 @@ struct fuse_lowlevel_ops { * @param cmd ioctl command * @param arg ioctl argument * @param fi file information - * @param flagsp io/out parameter for FUSE_IOCTL_* flags + * @param flags for FUSE_IOCTL_* flags * @param in_buf data fetched from the caller - * @param in_size number of fetched bytes - * @param out_size maximum size of output data + * @param in_bufsz number of fetched bytes + * @param out_bufsz maximum size of output data */ void (*ioctl) (fuse_req_t req, fuse_ino_t ino, int cmd, void *arg, - struct fuse_file_info *fi, unsigned *flagsp, - const void *in_buf, size_t in_bufsz, size_t out_bufszp); + struct fuse_file_info *fi, unsigned flags, + const void *in_buf, size_t in_bufsz, size_t out_bufsz); /** * Poll for IO readiness @@ -1116,6 +1117,20 @@ int fuse_reply_ioctl_retry(fuse_req_t req, int fuse_reply_ioctl(fuse_req_t req, int result, const void *buf, size_t size); /** + * Reply to finish ioctl with iov buffer + * + * Possible requests: + * ioctl + * + * @param req request handle + * @param result result to be passed to the caller + * @param iov the vector containing the data + * @param count the size of vector + */ +int fuse_reply_ioctl_iov(fuse_req_t req, int result, const struct iovec *iov, + int count); + +/** * Reply with poll result event mask * * @param req request handle |