From edcbc66844858b4e5192f5f9f9577a1711eec4f9 Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Wed, 15 Apr 2020 17:05:17 +0300 Subject: [PATCH] bluestore/bluestore_tool: fix execute_command return handling Signed-off-by: Igor Fedotov --- src/os/bluestore/bluestore_tool.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/bluestore/bluestore_tool.cc b/src/os/bluestore/bluestore_tool.cc index 9ebf41c939c..29cdb2c06ad 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); } -- 2.39.5