diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-18 21:23:22 -0700 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2016-10-20 15:32:20 -0700 |
commit | 8ee553dac0297cfd75cbdd2d9cfdce37e22ef4ee (patch) | |
tree | adce5564ea418e2c7427ca2e4488bc67177da636 /example/hello.c | |
parent | cb8fa961dcfddc0fa7ed864161b74de0b66ee5c0 (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/hello.c')
-rw-r--r-- | example/hello.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/example/hello.c b/example/hello.c index c587d72..b7ce45b 100644 --- a/example/hello.c +++ b/example/hello.c @@ -68,6 +68,14 @@ static const struct fuse_opt option_spec[] = { FUSE_OPT_END }; +static void *hello_init(struct fuse_conn_info *conn, + struct fuse_config *cfg) +{ + (void) conn; + cfg->kernel_cache = 1; + return NULL; +} + static int hello_getattr(const char *path, struct stat *stbuf, struct fuse_file_info *fi) { @@ -137,6 +145,7 @@ static int hello_read(const char *path, char *buf, size_t size, off_t offset, } static struct fuse_operations hello_oper = { + .init = hello_init, .getattr = hello_getattr, .readdir = hello_readdir, .open = hello_open, |