fixes
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 5 Feb 2007 11:26:33 +0000 (11:26 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Mon, 5 Feb 2007 11:26:33 +0000 (11:26 +0000)
ChangeLog
kernel/fuse_i.h
util/mount.fuse

index 84328a9fca483b734fff9274f49f066c488d1ad6..9c03e882ee2b6c8de41e7798236773456615f34a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-02-05  Miklos Szeredi <miklos@szeredi.hu>
+
+       * Fix 2.6.9 RHEL kernels, which have compatibility mutex.h, but
+       don't define mutex_destroy(), bummer.  Patch from Phil Schwan
+
+       * Fix option parsing in mount.fuse.  Patch from Jens M. Noedler
+
 2007-02-04  Miklos Szeredi <miklos@szeredi.hu>
 
        * Released 2.6.3
index 7fd70a4fcf0760e5ca57affe970d6d6b65cf8571..e3aad476cad8bef6b31ae3d47767d1ab567f1a3a 100644 (file)
 #define mutex semaphore
 #endif
 #ifndef HAVE_I_MUTEX
+#ifndef mutex_destroy
+/* Some RHEL kernels include a backported mutex.h, which lacks mutex_destroy */
+#define mutex_destroy(m) do { } while (0)
+#endif
 #define i_mutex i_sem  /* Hack for struct inode */
 #endif
 #ifndef KERNEL_2_6_19_PLUS
index 0b111db399868ad002343a940dd130f5313fdc11..900849243abbe2833f8a83bbd4b2dba0251a7c1e 100644 (file)
@@ -6,7 +6,7 @@
 # to kick me to the right way
 #
 
-VERSION="0.0.1"
+VERSION="0.0.2"
 PRGNAME=`basename $0`
 
 if [ -z "$HOME" ]; then
@@ -45,8 +45,16 @@ MOUNTPOINT="$2"
 shift
 shift
 
-ignore_opts='\(user\|nouser\|users\|auto\|noauto\|_netdev\)'
-
-OPTIONS=`echo $@ | sed "s/,${ignore_opts}\|${ignore_opts},//g"`
+# loop over each mount option and skip all that should be ignored
+IFS=","
+for OPT in $@; do
+       OPT=`echo $OPT | sed "s/^\(-o\|user\|nouser\|users\|auto\|noauto\|_netdev\)$/ignore/"`
+       if [ "$OPT" == "ignore" ]; then continue; fi
+       OPTIONS="$OPTIONS$OPT,"
+done
+IFS=" "
+
+# add "-o " and remove trailing comma
+OPTIONS="-o `echo $OPTIONS | sed "s/,$//"`"
 
 ${FSTYPE} ${MOUNTPATH} ${MOUNTPOINT} ${OPTIONS}