diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2010-11-10 11:41:21 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2010-11-10 11:41:21 +0100 |
commit | 63322038855660cc106c8f87a2ae42bcac37a4af (patch) | |
tree | 36445b71a1cc00b5f30e3f1da4b08d7fea644caa /lib/modules/subdir.c | |
parent | df31f2b11efd0d024f12c7035ab0d3646ad9c7c6 (diff) | |
download | libfuse-63322038855660cc106c8f87a2ae42bcac37a4af.tar.gz |
add read_buf method to high level API
Add a new read_buf() method to the highlevel API. This allows
returning a generic buffer from the read method, which in turn allows
zero copy reads.
Diffstat (limited to 'lib/modules/subdir.c')
-rw-r--r-- | lib/modules/subdir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/modules/subdir.c b/lib/modules/subdir.c index 788765c..6d9ac89 100644 --- a/lib/modules/subdir.c +++ b/lib/modules/subdir.c @@ -384,14 +384,14 @@ static int subdir_open(const char *path, struct fuse_file_info *fi) return err; } -static int subdir_read(const char *path, char *buf, size_t size, off_t offset, - struct fuse_file_info *fi) +static int subdir_read_buf(const char *path, struct fuse_bufvec **bufp, + size_t size, off_t offset, struct fuse_file_info *fi) { struct subdir *d = subdir_get(); char *newpath; int err = subdir_addpath(d, path, &newpath); if (!err) { - err = fuse_fs_read(d->next, newpath, buf, size, offset, fi); + err = fuse_fs_read_buf(d->next, newpath, bufp, size, offset, fi); free(newpath); } return err; @@ -587,7 +587,7 @@ static struct fuse_operations subdir_oper = { .utimens = subdir_utimens, .create = subdir_create, .open = subdir_open, - .read = subdir_read, + .read_buf = subdir_read_buf, .write_buf = subdir_write_buf, .statfs = subdir_statfs, .flush = subdir_flush, |