aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/fuse.c5
-rwxr-xr-xlib/fuse_lowlevel.c1
-rw-r--r--lib/helper.c1
-rw-r--r--lib/mount.c2
-rw-r--r--lib/mount_bsd.c2
5 files changed, 11 insertions, 0 deletions
diff --git a/lib/fuse.c b/lib/fuse.c
index a879ffa..cd254f9 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -4684,6 +4684,9 @@ struct fuse *fuse_new(struct fuse_chan *ch, struct fuse_args *args,
init_list_head(&f->full_slabs);
init_list_head(&f->lru_table);
+ /* When --help or --version are specified, we print messages
+ to stderr but continue for now (and keep the arguments in
+ `args` for use below */
if (fuse_opt_parse(args, &f->conf, fuse_lib_opts,
fuse_lib_opt_proc) == -1)
goto out_free_fs;
@@ -4714,6 +4717,8 @@ struct fuse *fuse_new(struct fuse_chan *ch, struct fuse_args *args,
f->conf.readdir_ino = 1;
#endif
+ /* This function will return NULL if there is an --help
+ or --version argument in `args` */
f->se = fuse_lowlevel_new(args, &llop, sizeof(llop), f);
if (f->se == NULL) {
if (f->conf.help)
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 9b59515..31714dd 100755
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -2674,6 +2674,7 @@ static int fuse_ll_opt_proc(void *data, const char *arg, int key,
fprintf(stderr, "fuse: unknown option `%s'\n", arg);
}
+ /* Fail */
return -1;
}
diff --git a/lib/helper.c b/lib/helper.c
index 97577c2..6a55269 100644
--- a/lib/helper.c
+++ b/lib/helper.c
@@ -114,6 +114,7 @@ static int fuse_helper_opt_proc(void *data, const char *arg, int key,
}
default:
+ /* Pass through unknown options */
return 1;
}
}
diff --git a/lib/mount.c b/lib/mount.c
index 7be7b25..b2b841d 100644
--- a/lib/mount.c
+++ b/lib/mount.c
@@ -241,6 +241,8 @@ static int fuse_mount_opt_proc(void *data, const char *arg, int key,
mo->ishelp = 1;
break;
}
+
+ /* Pass through unknown options */
return 1;
}
diff --git a/lib/mount_bsd.c b/lib/mount_bsd.c
index 3d6b12f..40ef93f 100644
--- a/lib/mount_bsd.c
+++ b/lib/mount_bsd.c
@@ -141,6 +141,8 @@ static int fuse_mount_opt_proc(void *data, const char *arg, int key,
mo->ishelp = 1;
break;
}
+
+ /* Pass through unknown options */
return 1;
}