Use /bin/mount on Linux, /sbin/mount on other systems
Change-Id: I8d2e518d29cedb1fbfa77d0189a2d4a24957e662 BUG: 2923 Reviewed-on: http://review.gluster.com/752 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
This commit is contained in:
parent
b21d430729
commit
8b8459b5ee
@ -35,6 +35,12 @@
|
|||||||
#define umount2(dir, flags) unmount(dir, ((flags) != 0) ? MNT_FORCE : 0)
|
#define umount2(dir, flags) unmount(dir, ((flags) != 0) ? MNT_FORCE : 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef linux
|
||||||
|
#define _PATH_MOUNT "/bin/mount"
|
||||||
|
#else /* NetBSD, MacOS X */
|
||||||
|
#define _PATH_MOUNT "/sbin/mount"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef FUSE_UTIL
|
#ifdef FUSE_UTIL
|
||||||
#define MALLOC(size) malloc (size)
|
#define MALLOC(size) malloc (size)
|
||||||
#define FREE(ptr) free (ptr)
|
#define FREE(ptr) free (ptr)
|
||||||
@ -174,10 +180,10 @@ fuse_mnt_add_mount (const char *progname, const char *fsname,
|
|||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
rmdir (tmp);
|
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);
|
"-o", opts, fsname, mnt, NULL);
|
||||||
GFFUSE_LOGERR ("%s: failed to execute /bin/mount: %s",
|
GFFUSE_LOGERR ("%s: failed to execute %s: %s",
|
||||||
progname, strerror (errno));
|
progname, _PATH_MOUNT, strerror (errno));
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
if (mtab_pid) {
|
if (mtab_pid) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user