fix
authorMiklos Szeredi <miklos@szeredi.hu>
Wed, 14 Dec 2005 23:25:00 +0000 (23:25 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Wed, 14 Dec 2005 23:25:00 +0000 (23:25 +0000)
ChangeLog
include/fuse_opt.h
lib/fuse.c
lib/fuse_lowlevel.c
lib/fuse_opt.c
lib/helper.c

index d5708538de1816ab8f0403cbbde68806c848e492..90e703235fedf44651532c1120241be47aa56ee7 100644 (file)
--- 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>
 
index 86099cde119f8b529cbb3b726714048fd00d9ba4..82818827d303db84e76a48266d8da07a732d83cb 100644 (file)
@@ -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
index d97f5255f336e488446f9c8db495eb44485389db..3b64bc4e9c6517faec4afe53da327dba4dda18f5 100644 (file)
@@ -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);
 }
 
index b35b16a8391a3a23be8e05f98df0381f85656578..176b718f5a60dac9c2f7bdad5b1f0458c8fa3f98 100644 (file)
@@ -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;
 }
index 4eb4eed90a5307ff2954011a05f78a83879dbbb2..a0ed4acfae2f8c53b803fbd732c0d3614d49d664 100644 (file)
@@ -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;
     }
index bb02a3a25ee603363084e993d6875a22d5f73383..d61aaec85dc88ad18370a1238cf9d2d50344768a 100644 (file)
@@ -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: