]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
bluestore/bluestore_tool: fix execute_command return handling
authorIgor Fedotov <ifedotov@suse.com>
Wed, 15 Apr 2020 14:05:17 +0000 (17:05 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Wed, 8 Jul 2020 19:43:48 +0000 (22:43 +0300)
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit edcbc66844858b4e5192f5f9f9577a1711eec4f9)

src/os/bluestore/bluestore_tool.cc

index b5f005797321eb6b550620b86d3cf452a60ee357..14858ee467d0e0059ec4ff94a437a86a62951891 100644 (file)
@@ -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);
       }