summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-08-24 15:31:36 +0000
committermpi <mpi@openbsd.org>2015-08-24 15:31:36 +0000
commit08d664a0199ec5aa5adfe846e85811e099592a58 (patch)
treeccabcf9c783115f683a45c70b4c76c5bc80128c6
parentItems from pool sosplice_pool are get in process context and put (diff)
downloadwireguard-openbsd-08d664a0199ec5aa5adfe846e85811e099592a58.tar.xz
wireguard-openbsd-08d664a0199ec5aa5adfe846e85811e099592a58.zip
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@
-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);