aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--include/fuse_opt.h5
-rw-r--r--lib/fuse.c5
-rw-r--r--lib/fuse_lowlevel.c5
-rw-r--r--lib/fuse_opt.c2
-rw-r--r--lib/helper.c6
6 files changed, 22 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index d570853..90e7032 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,7 +5,10 @@
Kolasny
* If lookup returns invalid mode, return -EIO instead of creating
- a regular file.
+ a regular file
+
+ * Add current output argument vector to option processing
+ function
2005-12-12 Miklos Szeredi <miklos@szeredi.hu>
diff --git a/include/fuse_opt.h b/include/fuse_opt.h
index 86099cd..8281882 100644
--- a/include/fuse_opt.h
+++ b/include/fuse_opt.h
@@ -136,9 +136,12 @@ struct fuse_opt {
* @param data is the user data passed to the fuse_opt_parse() function
* @param arg is the whole argument or option
* @param key determines why the processing function was called
+ * @param argcout pointer to output argument count
+ * @param argvout pointer to output argument vector
* @return -1 on error, 0 if arg is to be discarded, 1 if arg should be kept
*/
-typedef int (*fuse_opt_proc_t)(void *data, const char *arg, int key);
+typedef int (*fuse_opt_proc_t)(void *data, const char *arg, int key,
+ int *argcout, char **argvout[]);
/**
* Option parsing function
diff --git a/lib/fuse.c b/lib/fuse.c
index d97f525..3b64bc4 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -1807,10 +1807,13 @@ void fuse_set_getcontext_func(struct fuse_context *(*func)(void))
fuse_getcontext = func;
}
-static int fuse_lib_opt_proc(void *data, const char *arg, int key)
+static int fuse_lib_opt_proc(void *data, const char *arg, int key,
+ int *argcp, char **argvp[])
{
struct fuse_config *conf = data;
(void) key;
+ (void) argcp;
+ (void) argvp;
return fuse_opt_add_opt(&conf->llopts, arg);
}
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index b35b16a..176b718 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -925,10 +925,13 @@ static struct fuse_opt fuse_ll_opts[] = {
FUSE_OPT_END
};
-static int fuse_ll_opt_proc(void *data, const char *arg, int key)
+static int fuse_ll_opt_proc(void *data, const char *arg, int key,
+ int *argcp, char **argvp[])
{
(void) data;
(void) key;
+ (void) argcp;
+ (void) argvp;
fprintf(stderr, "fuse: unknown option `%s'\n", arg);
return -1;
}
diff --git a/lib/fuse_opt.c b/lib/fuse_opt.c
index 4eb4eed..a0ed4ac 100644
--- a/lib/fuse_opt.c
+++ b/lib/fuse_opt.c
@@ -114,7 +114,7 @@ static int call_proc(struct fuse_opt_context *ctx, const char *arg, int key,
int iso)
{
if (ctx->proc) {
- int res = ctx->proc(ctx->data, arg, key);
+ int res = ctx->proc(ctx->data, arg, key, &ctx->argcout, &ctx->argvout);
if (res == -1 || !res)
return res;
}
diff --git a/lib/helper.c b/lib/helper.c
index bb02a3a..d61aaec 100644
--- a/lib/helper.c
+++ b/lib/helper.c
@@ -156,10 +156,14 @@ static const struct fuse_opt fuse_helper_opts[] = {
FUSE_OPT_END
};
-static int fuse_helper_opt_proc(void *data, const char *arg, int key)
+static int fuse_helper_opt_proc(void *data, const char *arg, int key,
+ int *argcp, char **argvp[])
{
struct helper_opts *hopts = data;
+ (void) argcp;
+ (void) argvp;
+
switch (key) {
case KEY_HELP:
case KEY_HELP_NOHEADER: