summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2012-09-10 16:07:13 +0200
committerAnand Avati <avati@redhat.com>2012-09-12 12:39:41 -0700
commit80ef34fea4a8850b6f34dc59dcdfaef989d7b9e5 (patch)
tree662fc8c1f0d553a8a845326f926246fa2ddd2bc5 /xlators/mount/fuse
parent700ed44e73fee15d678654830c4cb019ffaeb4af (diff)
mount.glusterfs NerBSD portability fix
NetBSD stat(1) gets inode using -f %i while Linux uses -c %i This has already been fixed a few lines above, but one test failed to be fixed. This is not based on master, as the code hasbeen reworked a lot, and is already bug-free. BUG: 764655 Change-Id: I5dc1196ddba06ff31f695b7dbb0c6d28df32f324 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/3926 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mount/fuse')
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index a43efe531d7..494c894ec90 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -156,7 +156,15 @@ start_glusterfs ()
$cmd_line1;
err=0;
- inode=$(stat -c %i $mount_point 2>/dev/null);
+ case `uname -s` in
+ NetBSD)
+ inode=$(stat -f %i ${mount_point}/ 2>/dev/null);
+ ;;
+ Linux)
+ inode=$(stat -c %i $mount_point 2>/dev/null);
+ ;;
+ esac
+
# this is required if the stat returns error
if [ -z "$inode" ]; then
inode="0";