add access operation
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 @@
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 @@
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 @@
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);
}