Fixed/stripped options not valid and unsupported by fusermount(8).
authorlace <>
Tue, 27 Dec 2005 03:59:20 +0000 (03:59 +0000)
committerlace <>
Tue, 27 Dec 2005 03:59:20 +0000 (03:59 +0000)
 - Bugreported by: Steven N. Hirsch

src/client/fuse/main.c

index c018808..5b942e6 100644 (file)
@@ -212,6 +212,17 @@ char *s,quote;
                        g_error(_("Error splitting arguments of the space-reparsed '-o': %s"),opt_o_spaced);
                /* Pre-dash "ro"/"rw" to let libcaptive to be aware of the mode. */
                for (csp=opt_o_argv;*csp;csp++) {
+                       /* Unsupported options not valid for fusermount(8) and causing:
+                        *      fusermount: mount failed: Invalid argument */
+                       if (0
+                                       || !strcmp(*csp,"defaults")
+                                       || !strcmp(*csp,  "auto")
+                                       || !strcmp(*csp,"noauto")) {
+                               memmove(csp,csp+1,(opt_o_argv+opt_o_argc+1-(csp+1))*sizeof(*csp));
+                               opt_o_argc--;
+                               csp--;
+                               continue;
+                               }
                        if (!strcmp(*csp,"ro"))
                                *csp="--ro";
                        if (!strcmp(*csp,"rw"))