From b0b13d1e5499e20382ad74e202160d49e1792ee8 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Wed, 26 Oct 2005 12:53:25 +0000 Subject: add access operation --- lib/fuse_lowlevel.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/fuse_lowlevel.c') diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index 95882ed..22dc41d 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -69,6 +69,7 @@ static const char *opname(enum fuse_opcode opcode) case FUSE_READDIR: return "READDIR"; case FUSE_RELEASEDIR: return "RELEASEDIR"; case FUSE_FSYNCDIR: return "FSYNCDIR"; + case FUSE_ACCESS: return "ACCESS"; default: return "???"; } } @@ -361,6 +362,15 @@ static void do_setattr(fuse_req_t req, fuse_ino_t nodeid, fuse_reply_err(req, ENOSYS); } +static void do_access(fuse_req_t req, fuse_ino_t nodeid, + struct fuse_access_in *arg) +{ + if (req->f->op.access) + req->f->op.access(req, nodeid, arg->mask); + else + fuse_reply_err(req, ENOSYS); +} + static void do_readlink(fuse_req_t req, fuse_ino_t nodeid) { if (req->f->op.readlink) @@ -811,6 +821,10 @@ static void fuse_ll_process(void *data, const char *buf, size_t len, do_fsyncdir(req, in->nodeid, (struct fuse_fsync_in *) inarg); break; + case FUSE_ACCESS: + do_access(req, in->nodeid, (struct fuse_access_in *) inarg); + break; + default: fuse_reply_err(req, ENOSYS); } -- cgit v1.2.3