summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2011-09-12 15:51:42 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-13 00:09:46 -0700
commit17e57f27c714c94dd5d9fa91650f83d069f2f4e4 (patch)
treefb8c77c31e2536524e94f682a16d1ebef394fff8 /xlators/mgmt/glusterd/src/glusterd-utils.c
parent8778c0bf72cc28a56becf0fd989bf66df51fd8a3 (diff)
mgmt/glusterd: check the availability of fuse for few glusterd operations
Change-Id: I410cc6a86c32637566e5498f69f46cb40322e7fb BUG: 2715 Reviewed-on: http://review.gluster.com/364 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 3aafd6e9ab7..8694f753631 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -94,6 +94,20 @@ glusterd_unset_lock_owner (uuid_t owner)
}
gf_boolean_t
+glusterd_is_fuse_available ()
+{
+
+ int fd = 0;
+
+ fd = open ("/dev/fuse", O_RDWR);
+
+ if (fd > -1 && !close (fd))
+ return _gf_true;
+ else
+ return _gf_false;
+}
+
+gf_boolean_t
glusterd_is_loopback_localhost (const struct sockaddr *sa, char *hostname)
{
GF_ASSERT (sa);