diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-04-07 15:40:21 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-04-07 15:40:21 +0000 |
commit | ab9745641373d35235b8c0d124f1c355908b575f (patch) | |
tree | 4ad92b37432ff7dcbcdd0ba57b85dfe00f89c505 /example/hello.c | |
parent | 670c78a3134f2233b018fa931e1a7e69e4ab11fd (diff) | |
download | libfuse-ab9745641373d35235b8c0d124f1c355908b575f.tar.gz |
fix
Diffstat (limited to 'example/hello.c')
-rw-r--r-- | example/hello.c | 14 |
1 files changed, 9 insertions, 5 deletions
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, }; |