aboutsummaryrefslogtreecommitdiffstats
path: root/example/invalidate_path.c
diff options
context:
space:
mode:
authorAKowshik <AKowshik@users.noreply.github.com>2020-09-10 00:47:06 +0530
committerGitHub <noreply@github.com>2020-09-09 20:17:06 +0100
commit86f40b858487ca218906f3306e5ec839d926f647 (patch)
tree0249956a4b49a6daa3b8d153b357272915fcfae3 /example/invalidate_path.c
parentdfb4054bb73fe55bb18392b4fb537b7584ccc096 (diff)
downloadlibfuse-86f40b858487ca218906f3306e5ec839d926f647.tar.gz
Updated example code to work with new API (#547)
Diffstat (limited to 'example/invalidate_path.c')
-rw-r--r--example/invalidate_path.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/example/invalidate_path.c b/example/invalidate_path.c
index 09df178..61ec351 100644
--- a/example/invalidate_path.c
+++ b/example/invalidate_path.c
@@ -25,7 +25,7 @@
* \include @file
*/
-#define FUSE_USE_VERSION 31
+#define FUSE_USE_VERSION 34
#include <fuse.h>
#include <fuse_lowlevel.h> /* for fuse_cmdline_opts */
@@ -212,6 +212,7 @@ int main(int argc, char *argv[]) {
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
struct fuse *fuse;
struct fuse_cmdline_opts opts;
+ struct fuse_loop_config config;
int res;
/* Initialize the files */
@@ -271,8 +272,11 @@ int main(int argc, char *argv[]) {
if (opts.singlethread)
res = fuse_loop(fuse);
- else
- res = fuse_loop_mt(fuse, opts.clone_fd);
+ else {
+ config.clone_fd = opts.clone_fd;
+ config.max_idle_threads = opts.max_idle_threads;
+ res = fuse_loop_mt(fuse, &config);
+ }
if (res)
res = 1;