From 5df94a1e2bf07d9185052da9eb5f1803c0f5ddf9 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 5 Feb 2007 11:26:33 +0000 Subject: [PATCH] fixes --- ChangeLog | 7 +++++++ kernel/fuse_i.h | 4 ++++ util/mount.fuse | 16 ++++++++++++---- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84328a9..9c03e88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-02-05 Miklos Szeredi + + * 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 * Released 2.6.3 diff --git a/kernel/fuse_i.h b/kernel/fuse_i.h index 7fd70a4..e3aad47 100644 --- a/kernel/fuse_i.h +++ b/kernel/fuse_i.h @@ -67,6 +67,10 @@ #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 diff --git a/util/mount.fuse b/util/mount.fuse index 0b111db..9008492 100644 --- a/util/mount.fuse +++ b/util/mount.fuse @@ -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} -- 2.30.2