aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse_lowlevel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/fuse_lowlevel.h')
-rw-r--r--include/fuse_lowlevel.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h
index 2855e51..ad17b07 100644
--- a/include/fuse_lowlevel.h
+++ b/include/fuse_lowlevel.h
@@ -124,6 +124,14 @@ 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 *
* ----------------------------------------------------------- */
@@ -412,6 +420,7 @@ struct fuse_lowlevel_ops {
* Valid replies:
* fuse_reply_buf
* fuse_reply_iov
+ * fuse_reply_fd
* fuse_reply_err
*
* @param req request handle
@@ -561,6 +570,7 @@ struct fuse_lowlevel_ops {
*
* Valid replies:
* fuse_reply_buf
+ * fuse_reply_fd
* fuse_reply_err
*
* @param req request handle
@@ -646,6 +656,7 @@ struct fuse_lowlevel_ops {
*
* Valid replies:
* fuse_reply_buf
+ * fuse_reply_fd
* fuse_reply_xattr
* fuse_reply_err
*
@@ -672,6 +683,7 @@ struct fuse_lowlevel_ops {
*
* Valid replies:
* fuse_reply_buf
+ * fuse_reply_fd
* fuse_reply_xattr
* fuse_reply_err
*
@@ -996,6 +1008,22 @@ 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
+ *
+ * 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
+ * @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);
+
+/**
* Reply with data vector
*
* Possible requests: