This is a multi-part message in MIME format. --------------050904060701080409070505 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit nf2 wrote: > I would like to add non standard options when mounting a fuse > filesystem. The basic idea that they should show up in /etc/mtab to be > read by desktop vfs libraries and filemanagers. Their purpose is to turn > .Trash and preview rendering on/off, which is sometimes desirable: > > -o notrash,nopreviews > > I have already patched fusermount to let them through, but now i get: > > fusermount: mount failed: Invalid argument > > Hmm... > > Ah - found it myself. The FUSE kernel module also needs a little "fix". Here is a little patch which enables the option -o add_kernel_opt=xxxxx But, of course, setting arbitrary options might be a security problem... Don't know... Norbert --------------050904060701080409070505 Content-Type: text/x-patch; name="fuse_2.6.6_add_kernel_opt.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fuse_2.6.6_add_kernel_opt.patch" diff -u -r /tmp/fuse-2.6.5/kernel/inode.c fuse-2.6.5/kernel/inode.c --- /tmp/fuse-2.6.5/kernel/inode.c 2007-02-04 14:34:51.000000000 +0100 +++ fuse-2.6.5/kernel/inode.c 2007-10-08 20:17:00.000000000 +0200 @@ -399,7 +399,8 @@ break; default: - return 0; + //return 0; + break; } } diff -u -r /tmp/fuse-2.6.5/lib/mount.c fuse-2.6.5/lib/mount.c --- /tmp/fuse-2.6.5/lib/mount.c 2007-01-02 18:10:33.000000000 +0100 +++ fuse-2.6.5/lib/mount.c 2007-10-08 20:37:04.000000000 +0200 @@ -35,6 +35,7 @@ KEY_RO, KEY_HELP, KEY_VERSION, + ADD_KERNEL_OPT }; struct mount_opts { @@ -75,6 +76,7 @@ FUSE_OPT_KEY("--help", KEY_HELP), FUSE_OPT_KEY("-V", KEY_VERSION), FUSE_OPT_KEY("--version", KEY_VERSION), + FUSE_OPT_KEY("add_kernel_opt=", ADD_KERNEL_OPT), FUSE_OPT_END }; @@ -128,6 +130,13 @@ case KEY_KERN: return fuse_opt_add_opt(&mo->kernel_opts, arg); + case ADD_KERNEL_OPT: + { + char * eqpos = strchr(arg, '='); + if (eqpos && strlen(eqpos+1)>0) + return fuse_opt_add_opt(&mo->kernel_opts, eqpos+1); + break; + } case KEY_HELP: mount_help(); mo->ishelp = 1; --------------050904060701080409070505 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ --------------050904060701080409070505 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ fuse-devel mailing list fuse-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fuse-devel --------------050904060701080409070505--