diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-02-28 11:46:56 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-02-28 11:46:56 +0000 |
commit | f43f06394ff53c2cb36a6843298fe36900cd902c (patch) | |
tree | ec83707d80bdc26ed5c82f7d492ffa77a3a08cc8 /lib | |
parent | 47c529838cde03fa23387f2bf91dfb5706a4470b (diff) | |
download | libfuse-f43f06394ff53c2cb36a6843298fe36900cd902c.tar.gz |
fixes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 2 | ||||
-rw-r--r-- | lib/fuse.c | 26 |
2 files changed, 18 insertions, 10 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 952dcd8..b344ef3 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -9,7 +9,7 @@ libfuse_la_SOURCES = \ mount.c \ fuse_i.h -libfuse_la_LDFLAGS = -lpthread -version-number 2:2:0 \ +libfuse_la_LDFLAGS = -lpthread -version-number 2:3:0 \ -Wl,--version-script,fuse_versionscript EXTRA_DIST = fuse_versionscript @@ -73,13 +73,6 @@ struct fuse_cmd { static struct fuse_context *(*fuse_getcontext)(void) = NULL; -/* Compatibility with kernel ABI version 5.1 */ -struct fuse_getdir_out { - __u32 fd; -}; - -#define FUSE_GETDIR 7 - static const char *opname(enum fuse_opcode opcode) { switch (opcode) { @@ -89,7 +82,6 @@ static const char *opname(enum fuse_opcode opcode) case FUSE_SETATTR: return "SETATTR"; case FUSE_READLINK: return "READLINK"; case FUSE_SYMLINK: return "SYMLINK"; - case FUSE_GETDIR: return "GETDIR"; case FUSE_MKNOD: return "MKNOD"; case FUSE_MKDIR: return "MKDIR"; case FUSE_UNLINK: return "UNLINK"; @@ -1523,7 +1515,23 @@ static void do_opendir(struct fuse *f, struct fuse_in_header *in, struct fuse_open_out outarg; struct fuse_dirhandle *dh; - (void) arg; + if (f->op.opendir) { + char *path; + res = -ENOENT; + path = get_path(f, in->nodeid); + if (path != NULL) { + struct fuse_file_info fi; + memset(&fi, 0, sizeof(fi)); + fi.flags = arg->flags; + res = f->op.opendir(path, &fi); + free(path); + } + if (res != 0) { + send_reply(f, in, res, NULL, 0); + return; + } + } + memset(&outarg, 0, sizeof(outarg)); res = -ENOMEM; dh = (struct fuse_dirhandle *) malloc(sizeof(struct fuse_dirhandle)); |