From 5f0548192fc4df56e8b21c239f8f75479147e34a Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Tue, 3 Dec 2002 18:45:21 +0000 Subject: [PATCH] fixes --- ChangeLog | 5 +++++ configure.in | 17 ++--------------- include/fuse.h | 3 +++ util/fusermount.c | 17 +++++++++++++---- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 62a859a..9b21b59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-12-03 Miklos Szeredi + + * Added _FILE_OFFSET_BITS=64 define to fuse.h. Note, that this is + an incompatible interface change. + 2002-10-28 Miklos Szeredi * Portablility fix (bug reported by C. Chris Erway) diff --git a/configure.in b/configure.in index 2238b60..dff58c6 100644 --- a/configure.in +++ b/configure.in @@ -21,6 +21,8 @@ AC_ARG_ENABLE(util, AC_ARG_ENABLE(example, [ --enable-example Compile with examples ]) +subdirs="include patch" + if test "$enable_kernel_module" != "no"; then AC_MSG_CHECKING([kernel source directory]) kernelsrc= @@ -40,16 +42,7 @@ if test "$enable_kernel_module" != "no"; then fi fi AC_MSG_RESULT([$kernelsrc]) -fi - -oldcc=$CC -oldcross_compiling=$cross_compiling -if test "$cross_compiling" = yes; then - CC=gcc - cross_compiling=no -fi -if test "$enable_kernel_module" != "no"; then AC_MSG_CHECKING([kernel source version]) kernsrcver=`sed -ne '/^VERSION = \(.*\)/{s//\1/;p;q;}' $kernelsrc/Makefile` kernsrcver="$kernsrcver.`sed -ne '/^PATCHLEVEL = \(.*\)/{s//\1/;p;q;}' $kernelsrc/Makefile`" @@ -63,13 +56,7 @@ if test "$enable_kernel_module" != "no"; then *** configure the kernel before running this script]) fi AC_MSG_RESULT([$kernsrcver]) -fi -CC=$oldcc -cross_compiling=$oldcross_compiling -subdirs="include patch" - -if test "$enable_kernel_module" != "no"; then KERNINCLUDE=$kernelsrc/include AC_SUBST(KERNINCLUDE) kmoduledir=/lib/modules/$kernsrcver diff --git a/include/fuse.h b/include/fuse.h index c4cfbc4..68f8eec 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -11,6 +11,9 @@ /* This file defines the library interface of FUSE */ +/* Now and forever: this interface uses 64 bit off_t */ +#define _FILE_OFFSET_BITS 64 + #include #include #include diff --git a/util/fusermount.c b/util/fusermount.c index ac464d2..b76c819 100644 --- a/util/fusermount.c +++ b/util/fusermount.c @@ -384,10 +384,19 @@ static char *resolve_path(const char *orig, int unmount) { char buf[PATH_MAX]; - /* Resolving at unmount can only be done very carefully, not touching - the mountpoint... So for the moment it's not done. */ - if(unmount) - return strdup(orig); + if(unmount) { + /* Resolving at unmount can only be done very carefully, not touching + the mountpoint... So for the moment it's not done. + + Just remove trailing slashes instead. + */ + char *dst = strdup(orig); + char *end; + for(end = dst + strlen(dst) - 1; end > dst && *end == '/'; end --) + *end = '\0'; + + return dst; + } if(realpath(orig, buf) == NULL) { fprintf(stderr, "%s: Bad mount point %s: %s\n", progname, orig, -- 2.30.2