diff options
author | Vijay Bellur <vbellur@redhat.com> | 2017-06-15 10:57:26 +0530 |
---|---|---|
committer | Prasanna Kumar Kalever <pkalever@redhat.com> | 2017-06-22 16:09:10 +0000 |
commit | fd2732b97901f0025900509a59e79cd78c58393e (patch) | |
tree | 7c576bd39768fb4635ebbe02f9d49548e39803eb | |
parent | b5cdd05c8b03b8ca629ec4dd6dc609fefc8e6bf2 (diff) |
runner: check for all non-zero exit status values
Change-Id: I4fc56e3fdcbccfde3a70a98f2697744444797e06
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | rpc/block_svc_routines.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/block_svc_routines.c b/rpc/block_svc_routines.c index 99d23f2..ca39702 100644 --- a/rpc/block_svc_routines.c +++ b/rpc/block_svc_routines.c @@ -1893,7 +1893,7 @@ blockNodeSanityCheck(blockResponse *reply) /* Check if tcmu-runner is running */ ret = gbRunner("ps aux ww | grep -w '[t]cmu-runner' > /dev/null"); - if (ret == -1 || ret == 1) { + if (ret) { LOG("mgmt", GB_LOG_ERROR, "%s", "tcmu-runner not running"); reply->exit = ESRCH; GB_ASPRINTF(&reply->out, "tcmu-runner not running"); @@ -1902,7 +1902,7 @@ blockNodeSanityCheck(blockResponse *reply) /* Check targetcli has user:glfs handler listed */ ret = gbRunner(GB_TGCLI_GLFS_CHECK); - if (ret == -1 || ret == 1) { + if (ret) { LOG("mgmt", GB_LOG_ERROR, "%s", "tcmu-runner running, but targetcli doesn't list user:glfs handler"); reply->exit = ENODEV; |