diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2010-07-12 17:17:25 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2010-07-12 17:17:25 +0200 |
commit | 2709f9a53d94a2c181511a66a33a6f0f80d1b281 (patch) | |
tree | b349acd7f36f2cf77a0f15a327060b0c950c05f5 /include/fuse_lowlevel.h | |
parent | 5454e4fa74390b7c16cf37efb0ec11c0c9faad1c (diff) | |
download | libfuse-2709f9a53d94a2c181511a66a33a6f0f80d1b281.tar.gz |
libfuse: add buffer interface
Add a generic buffer interface for use with I/O. Buffer vectors are
supplied and each buffer in the vector may be a memory pointer or a
file descriptor.
The fuse_reply_fd() interface is converted to using buffers.
Diffstat (limited to 'include/fuse_lowlevel.h')
-rw-r--r-- | include/fuse_lowlevel.h | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index ad17b07..5592544 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -124,14 +124,6 @@ struct fuse_ctx { #define FUSE_SET_ATTR_ATIME_NOW (1 << 7) #define FUSE_SET_ATTR_MTIME_NOW (1 << 8) -/** - * flags for fuse_reply_fd() - * - * FUSE_REPLY_FD_MOVE: attempt to move the data instead of copying - * (see SPLICE_F_MOVE flag for splice(2) - */ -#define FUSE_REPLY_FD_MOVE (1 << 0) - /* ----------------------------------------------------------- * * Request methods and replies * * ----------------------------------------------------------- */ @@ -420,7 +412,7 @@ struct fuse_lowlevel_ops { * Valid replies: * fuse_reply_buf * fuse_reply_iov - * fuse_reply_fd + * fuse_reply_data * fuse_reply_err * * @param req request handle @@ -570,7 +562,7 @@ struct fuse_lowlevel_ops { * * Valid replies: * fuse_reply_buf - * fuse_reply_fd + * fuse_reply_data * fuse_reply_err * * @param req request handle @@ -656,7 +648,7 @@ struct fuse_lowlevel_ops { * * Valid replies: * fuse_reply_buf - * fuse_reply_fd + * fuse_reply_data * fuse_reply_xattr * fuse_reply_err * @@ -683,7 +675,7 @@ struct fuse_lowlevel_ops { * * Valid replies: * fuse_reply_buf - * fuse_reply_fd + * fuse_reply_data * fuse_reply_xattr * fuse_reply_err * @@ -1008,20 +1000,18 @@ int fuse_reply_write(fuse_req_t req, size_t count); int fuse_reply_buf(fuse_req_t req, const char *buf, size_t size); /** - * Reply with data copied/moved from a file descriptor + * Reply with data copied/moved from buffer(s) * * Possible requests: * read, readdir, getxattr, listxattr * * @param req request handle - * @param fd file descriptor - * @param off offset pointer, may be NULL - * @param len length of data in bytes - * @param flags FUSE_REPLY_FD_* flags + * @param bufv buffer vector + * @param flags flags controlling the copy * @return zero for success, -errno for failure to send reply */ -int fuse_reply_fd(fuse_req_t req, int fd, loff_t *off, size_t len, - unsigned int flags); +int fuse_reply_data(fuse_req_t req, struct fuse_bufvec *bufv, + enum fuse_buf_copy_flags flags); /** * Reply with data vector |