summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <[email protected]>2012-09-10 16:07:13 +0200
committerAnand Avati <[email protected]>2012-09-12 12:39:41 -0700
commit80ef34fea4a8850b6f34dc59dcdfaef989d7b9e5 (patch)
tree662fc8c1f0d553a8a845326f926246fa2ddd2bc5
parent700ed44e73fee15d678654830c4cb019ffaeb4af (diff)
downloadglusterfs-80ef34fea4a8850b6f34dc59dcdfaef989d7b9e5.tar.gz
glusterfs-80ef34fea4a8850b6f34dc59dcdfaef989d7b9e5.tar.xz
glusterfs-80ef34fea4a8850b6f34dc59dcdfaef989d7b9e5.zip
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 <[email protected]> Reviewed-on: http://review.gluster.org/3926 Tested-by: Gluster Build System <[email protected]> Reviewed-by: Anand Avati <[email protected]>
-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 a43efe531d..494c894ec9 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";
OSZAR »