aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2010-11-10 11:41:21 +0100
committerMiklos Szeredi <mszeredi@suse.cz>2010-11-10 11:41:21 +0100
commitdf31f2b11efd0d024f12c7035ab0d3646ad9c7c6 (patch)
treef10c9bfd6f4fea26681ccba13541f622eb683844 /include
parent4367f2df5038e369fef031e49448745e7065d179 (diff)
downloadandroid_external_fuse-df31f2b11efd0d024f12c7035ab0d3646ad9c7c6.tar.gz
android_external_fuse-df31f2b11efd0d024f12c7035ab0d3646ad9c7c6.tar.bz2
android_external_fuse-df31f2b11efd0d024f12c7035ab0d3646ad9c7c6.zip
add write_buf method to high level API
Add new write_buf() method to the highlevel API. Similarly to the lowlevel write_buf() method, this allows implementing zero copy writes.
Diffstat (limited to 'include')
-rw-r--r--include/fuse.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/fuse.h b/include/fuse.h
index 51ccb89..c2708cf 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -513,6 +513,17 @@ struct fuse_operations {
*/
int (*poll) (const char *, struct fuse_file_info *,
struct fuse_pollhandle *ph, unsigned *reventsp);
+
+ /** Write contents of buffer to an open file
+ *
+ * Similar to the write() method, but data is supplied in a
+ * generic buffer. Use fuse_buf_copy() to transfer data to
+ * the destination.
+ *
+ * Introduced in version 2.9
+ */
+ int (*write_buf) (const char *, struct fuse_bufvec *buf, off_t off,
+ struct fuse_file_info *);
};
/** Extra context that may be needed by some filesystems
@@ -726,6 +737,9 @@ int fuse_fs_read(struct fuse_fs *fs, const char *path, char *buf, size_t size,
off_t off, struct fuse_file_info *fi);
int fuse_fs_write(struct fuse_fs *fs, const char *path, const char *buf,
size_t size, off_t off, struct fuse_file_info *fi);
+int fuse_fs_write_buf(struct fuse_fs *fs, const char *path,
+ struct fuse_bufvec *buf, off_t off,
+ struct fuse_file_info *fi);
int fuse_fs_fsync(struct fuse_fs *fs, const char *path, int datasync,
struct fuse_file_info *fi);
int fuse_fs_flush(struct fuse_fs *fs, const char *path,