From 93431ad716dfb0efe9739df9285778f010c425a3 Mon Sep 17 00:00:00 2001 From: lace <> Date: Tue, 27 Dec 2005 03:59:20 +0000 Subject: [PATCH] Fixed/stripped options not valid and unsupported by fusermount(8). - Bugreported by: Steven N. Hirsch --- src/client/fuse/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/client/fuse/main.c b/src/client/fuse/main.c index c018808..5b942e6 100644 --- a/src/client/fuse/main.c +++ b/src/client/fuse/main.c @@ -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")) -- 1.8.3.1