From ab9745641373d35235b8c0d124f1c355908b575f Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Thu, 7 Apr 2005 15:40:21 +0000 Subject: fix --- example/hello.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'example/hello.c') diff --git a/example/hello.c b/example/hello.c index 9e4099b..b71bcd6 100644 --- a/example/hello.c +++ b/example/hello.c @@ -35,14 +35,18 @@ static int hello_getattr(const char *path, struct stat *stbuf) return res; } -static int hello_getdir(const char *path, fuse_dirh_t h, fuse_dirfil_t filler) +static int hello_readdir(const char *path, void *buf, fuse_fill_dir_t filler, + off_t offset, struct fuse_file_info *fi) { + (void) offset; + (void) fi; + if(strcmp(path, "/") != 0) return -ENOENT; - filler(h, ".", 0, 0); - filler(h, "..", 0, 0); - filler(h, hello_path + 1, 0, 0); + filler(buf, ".", NULL, 0); + filler(buf, "..", NULL, 0); + filler(buf, hello_path + 1, NULL, 0); return 0; } @@ -79,7 +83,7 @@ static int hello_read(const char *path, char *buf, size_t size, off_t offset, static struct fuse_operations hello_oper = { .getattr = hello_getattr, - .getdir = hello_getdir, + .readdir = hello_readdir, .open = hello_open, .read = hello_read, }; -- cgit v1.2.3