summaryrefslogtreecommitdiff
path: root/lib/libfuse
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-08-24 15:31:37 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-08-24 15:31:37 +0000
commitc344b72ed129e83aacaa5d43aec7f0b3b2e7e316 (patch)
treecd1f1a3300d3ab5d0d0cbaf98a4c623d3144216e /lib/libfuse
parente4faf55ba7e29e98f15a74862c1a34e819895f96 (diff)
When an option is not recognized call the processing function with
FUSE_OPT_KEY_OPT, while here fix the last argument of a call in fuse_opt_parse(). Diff from Thiébaud Weksteen <thiebaud AT weksteen DOT fr>, thanks! ok syl@, ajacoutot@
Diffstat (limited to 'lib/libfuse')
-rw-r--r--lib/libfuse/fuse_opt.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libfuse/fuse_opt.c b/lib/libfuse/fuse_opt.c
index b332bfb7cc3..300900b92c4 100644
--- a/lib/libfuse/fuse_opt.c
+++ b/lib/libfuse/fuse_opt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fuse_opt.c,v 1.13 2015/07/07 13:03:58 ajacoutot Exp $ */
+/* $OpenBSD: fuse_opt.c,v 1.14 2015/08/24 15:31:36 mpi Exp $ */
/*
* Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com>
* Copyright (c) 2013 Stefan Sperling <stsp@openbsd.org>
@@ -266,8 +266,10 @@ parse_opt(const struct fuse_opt *o, const char *val, void *data,
}
if (!found) {
- printf("fuse: unknown option %s\n", val);
- return (-1);
+ ret = f(data, val, FUSE_OPT_KEY_OPT, arg);
+ if (ret == 1)
+ fuse_opt_add_arg(arg, val);
+ return (ret);
}
return (ret);
@@ -300,7 +302,7 @@ fuse_opt_parse(struct fuse_args *args, void *data,
/* not - and not -- */
if (arg[0] != '-') {
- ret = f(data, arg, FUSE_OPT_KEY_NONOPT, 0);
+ ret = f(data, arg, FUSE_OPT_KEY_NONOPT, &outargs);
if (ret == 1)
fuse_opt_add_arg(&outargs, arg);