diff options
Diffstat (limited to 'filesystems/glusterfs/patches/patch-ae')
-rw-r--r-- | filesystems/glusterfs/patches/patch-ae | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/filesystems/glusterfs/patches/patch-ae b/filesystems/glusterfs/patches/patch-ae index 6e78d978a1d..48889308ada 100644 --- a/filesystems/glusterfs/patches/patch-ae +++ b/filesystems/glusterfs/patches/patch-ae @@ -1,13 +1,15 @@ -$NetBSD: patch-ae,v 1.8 2011/10/16 05:45:19 manu Exp $ +$NetBSD: patch-ae,v 1.9 2011/11/24 05:36:36 manu Exp $ On NetBSD use libperfuse(3), rename umount2(2) as unmount(2), and skip inexistant /etc/mtab management. Include <signal.h> for sigprocmask(2) +Use /sbin/mount on NetBSD, not /bin/mount + --- contrib/fuse-lib/mount.c.orig 2011-08-23 14:31:36.000000000 +0200 -+++ contrib/fuse-lib/mount.c 2011-10-14 15:15:40.000000000 +0200 -@@ -19,16 +19,24 @@ ++++ contrib/fuse-lib/mount.c 2011-11-24 03:31:11.000000000 +0100 +@@ -19,16 +19,30 @@ #include <limits.h> #include <fcntl.h> #include <errno.h> @@ -28,11 +30,17 @@ Include <signal.h> for sigprocmask(2) +#define umount2(dir, flags) unmount(dir, ((flags) != 0) ? MNT_FORCE : 0) +#endif + ++#ifdef linux ++#define _PATH_MOUNT "/bin/mount" ++#else /* NetBSD, MacOS X */ ++#define _PATH_MOUNT "/sbin/mount" ++#endif ++ #ifdef FUSE_UTIL #define MALLOC(size) malloc (size) #define FREE(ptr) free (ptr) #define GFFUSE_LOGERR(...) fprintf (stderr, ## __VA_ARGS__) -@@ -57,8 +65,9 @@ +@@ -57,8 +71,9 @@ * - s/free/FREE/, s/malloc/MALLOC/ * - there are some other minor things */ @@ -42,7 +50,7 @@ Include <signal.h> for sigprocmask(2) mtab_needs_update (const char *mnt) { int res; -@@ -90,8 +99,11 @@ +@@ -90,8 +105,11 @@ } return 1; @@ -54,3 +62,19 @@ Include <signal.h> for sigprocmask(2) #ifndef FUSE_UTIL static #endif +@@ -158,12 +176,12 @@ + progname, tmp, strerror (errno)); + exit (1); + } + rmdir (tmp); +- execl ("/bin/mount", "/bin/mount", "-i", "-f", "-t", type, ++ execl (_PATH_MOUNT, _PATH_MOUNT, "-i", "-f", "-t", type, + "-o", opts, fsname, mnt, NULL); +- GFFUSE_LOGERR ("%s: failed to execute /bin/mount: %s", +- progname, strerror (errno)); ++ GFFUSE_LOGERR ("%s: failed to execute %s: %s", ++ progname, _PATH_MOUNT, strerror (errno)); + exit (1); + } + res = waitpid (res, &status, 0); + if (res == -1) |