From fd2732b97901f0025900509a59e79cd78c58393e Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Thu, 15 Jun 2017 10:57:26 +0530 Subject: runner: check for all non-zero exit status values Change-Id: I4fc56e3fdcbccfde3a70a98f2697744444797e06 Signed-off-by: Vijay Bellur --- rpc/block_svc_routines.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rpc') 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; -- cgit