aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fuse.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2004-11-08 14:48:52 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2004-11-08 14:48:52 +0000
commit8fb48feb5024d2aa9083690e472f1b1072cb8169 (patch)
treef5822084907940cb656f271ea85dfebbfc717795 /lib/fuse.c
parentac36117c33b32d69a335f9c99091b09c2da07616 (diff)
downloadlibfuse-8fb48feb5024d2aa9083690e472f1b1072cb8169.tar.gz
getdir related API change
Diffstat (limited to 'lib/fuse.c')
-rw-r--r--lib/fuse.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/fuse.c b/lib/fuse.c
index 6b42252..ddb7ce3 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -429,13 +429,17 @@ static void convert_stat(struct stat *stbuf, struct fuse_attr *attr)
#endif
}
-static int fill_dir(struct fuse_dirhandle *dh, char *name, int type)
+static int fill_dir(struct fuse_dirhandle *dh, const char *name, int type,
+ ino_t ino)
{
struct fuse_dirent dirent;
size_t reclen;
size_t res;
- dirent.ino = (unsigned long) -1;
+ if ((dh->fuse->flags & FUSE_USE_INO))
+ dirent.ino = ino;
+ else
+ dirent.ino = (unsigned long) -1;
dirent.namelen = strlen(name);
strncpy(dirent.name, name, sizeof(dirent.name));
dirent.type = type;
@@ -821,7 +825,7 @@ static void do_getdir(struct fuse *f, struct fuse_in_header *in)
if (path != NULL) {
res = -ENOSYS;
if (f->op.getdir)
- res = f->op.getdir(path, &dh, (fuse_dirfil_t) fill_dir);
+ res = f->op.getdir(path, &dh, fill_dir);
free(path);
}
fflush(dh.fp);