diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2004-05-18 08:45:28 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2004-05-18 08:45:28 +0000 |
commit | e2e4ac2c990a9b09740e4be6ae2de811154cc5b3 (patch) | |
tree | 8648e21445e9c3a905b64e7acb6f58500b03249d /lib/fuse.c | |
parent | 43a20ad720402cf852fc8a6cdd20b98c74dcd816 (diff) | |
download | libfuse-e2e4ac2c990a9b09740e4be6ae2de811154cc5b3.tar.gz |
added flush() call
Diffstat (limited to 'lib/fuse.c')
-rw-r--r-- | lib/fuse.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -829,6 +829,22 @@ static void do_open(struct fuse *f, struct fuse_in_header *in, } } +static void do_flush(struct fuse *f, struct fuse_in_header *in) +{ + char *path; + int res; + + res = -ENOENT; + path = get_path(f, in->ino); + if(path != NULL) { + res = -ENOSYS; + if(f->op.flush) + res = f->op.flush(path); + free(path); + } + send_reply(f, in, res, NULL, 0); +} + static void do_release(struct fuse *f, struct fuse_in_header *in, struct fuse_open_in *arg) { @@ -1215,6 +1231,10 @@ void __fuse_process_cmd(struct fuse *f, struct fuse_cmd *cmd) do_open(f, in, (struct fuse_open_in *) inarg); break; + case FUSE_FLUSH: + do_flush(f, in); + break; + case FUSE_RELEASE: do_release(f, in, (struct fuse_open_in *) inarg); break; |