aboutsummaryrefslogtreecommitdiff
path: root/example/passthrough_fh.c
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-18 21:23:22 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-20 15:32:20 -0700
commit8ee553dac0297cfd75cbdd2d9cfdce37e22ef4ee (patch)
treeadce5564ea418e2c7427ca2e4488bc67177da636 /example/passthrough_fh.c
parentcb8fa961dcfddc0fa7ed864161b74de0b66ee5c0 (diff)
fuse_new(): don't accept options that don't make sense for end-users
Several options (use_ino, etc) depend on the file system implementation. Allowing them to be set from the command line makes no sense.
Diffstat (limited to 'example/passthrough_fh.c')
-rw-r--r--example/passthrough_fh.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/example/passthrough_fh.c b/example/passthrough_fh.c
index 35d909f..f74940d 100644
--- a/example/passthrough_fh.c
+++ b/example/passthrough_fh.c
@@ -52,6 +52,14 @@
#endif
#include <sys/file.h> /* flock(2) */
+static void *xmp_init(struct fuse_conn_info *conn,
+ struct fuse_config *cfg)
+{
+ (void) conn;
+ cfg->use_ino = 1;
+ return NULL;
+}
+
static int xmp_getattr(const char *path, struct stat *stbuf,
struct fuse_file_info *fi)
{
@@ -544,6 +552,7 @@ static int xmp_flock(const char *path, struct fuse_file_info *fi, int op)
}
static struct fuse_operations xmp_oper = {
+ .init = xmp_init,
.getattr = xmp_getattr,
.access = xmp_access,
.readlink = xmp_readlink,