From: Igor Fedotov Date: Wed, 15 Apr 2020 14:05:17 +0000 (+0300) Subject: bluestore/bluestore_tool: fix execute_command return handling X-Git-Tag: v15.2.5~156^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=22992f5caeba414ac66d8d7824a23ce04285463a;p=ceph.git bluestore/bluestore_tool: fix execute_command return handling Signed-off-by: Igor Fedotov (cherry picked from commit edcbc66844858b4e5192f5f9f9577a1711eec4f9) --- diff --git a/src/os/bluestore/bluestore_tool.cc b/src/os/bluestore/bluestore_tool.cc index b5f005797321..14858ee467d0 100644 --- a/src/os/bluestore/bluestore_tool.cc +++ b/src/os/bluestore/bluestore_tool.cc @@ -845,10 +845,10 @@ int main(int argc, char **argv) for (auto alloc_name : allocs_name) { ceph::bufferlist in, out; ostringstream err; - bool b = admin_socket->execute_command( + int r = admin_socket->execute_command( {"{\"prefix\": \"bluestore allocator " + action_name + " " + alloc_name + "\"}"}, in, err, &out); - if (!b) { + if (r != 0) { cerr << "failure querying '" << alloc_name << "'" << std::endl; exit(EXIT_FAILURE); }