From 4a0f5e49f85f88912cc9c73b379403ead82e4912 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 24 Apr 2012 16:36:52 +0530 Subject: glusterd: command check failure fixes due to the patch 29f2de478cc6a475e6ae760d9cbe7ac847e9d79c (coverity issues fix), geo-replications assumption of anything other than -2 is valid error (ie, expected error), was broken, which resulted in staging failure of all geo-replication commands. now fixed!!! Change-Id: I26c3574e966dd8ba89ef423a3ad17aa863a62c13 Signed-off-by: Amar Tumballi BUG: 815613 Reviewed-on: http://review.gluster.com/3219 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/syscall.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/syscall.c') diff --git a/libglusterfs/src/syscall.c b/libglusterfs/src/syscall.c index 8e2d56b8d..6be240599 100644 --- a/libglusterfs/src/syscall.c +++ b/libglusterfs/src/syscall.c @@ -241,7 +241,12 @@ sys_statvfs (const char *path, struct statvfs *buf) int sys_close (int fd) { - return close (fd); + int ret = -1; + + if (fd >= 0) + ret = close (fd); + + return ret; } -- cgit