summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorVenky Shankar <venky@gluster.com>2011-04-11 05:48:36 +0000
committerAnand Avati <avati@gluster.com>2011-04-11 23:50:28 -0700
commit2a6598646824da9d6a957fb5b3e4c6bb40fb6835 (patch)
tree2a432e056f4803967569f58f2d70e9c63e2ef306 /xlators/mgmt
parentcfd85789c44ce3f88d6bf87d7b0a47dafb8c6d57 (diff)
build fixes
Signed-off-by: Venky Shankar <venky@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2550 (build warnings) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2550
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index e8d107db7b8..0ee0206fa5e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -895,7 +895,9 @@ glusterd_service_stop (const char *service, char *pidfile, int sig,
ret = 0;
out:
if (is_locked && file)
- lockf (fileno (file), F_ULOCK, 0);
+ if (lockf (fileno (file), F_ULOCK, 0) < 0)
+ gf_log ("", GF_LOG_WARNING, "Cannot unlock pidfile: %s"
+ " reason: %s", pidfile, strerror(errno));
if (file)
fclose (file);
return ret;
@@ -1085,7 +1087,9 @@ connect:
goto out;
out:
if (is_locked && file)
- lockf (fileno (file), F_ULOCK, 0);
+ if (lockf (fileno (file), F_ULOCK, 0) < 0)
+ gf_log ("", GF_LOG_WARNING, "Cannot unlock pidfile: %s"
+ " reason: %s", pidfile, strerror(errno));
if (file)
fclose (file);
return ret;