diff options
author | Amar Tumballi <amarts@redhat.com> | 2012-04-24 16:36:52 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-04-24 13:32:00 -0700 |
commit | 4a0f5e49f85f88912cc9c73b379403ead82e4912 (patch) | |
tree | f00bf7460d949b0507d9b053dd04bcf11cc36398 /libglusterfs | |
parent | 2a59514236630756dc996e08b50f539ccc2d3ff0 (diff) |
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 <amarts@redhat.com>
BUG: 815613
Reviewed-on: http://review.gluster.com/3219
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/syscall.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; } |