]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-osdomap-tool: Fix tool exit status
authorDavid Zafman <dzafman@redhat.com>
Wed, 15 Feb 2017 22:59:40 +0000 (14:59 -0800)
committerDavid Zafman <dzafman@redhat.com>
Tue, 28 Mar 2017 16:32:46 +0000 (09:32 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 666f14ed90655a2d1bedde8561949625db7a9e6c)

src/tools/ceph_osdomap_tool.cc

index 21385b3e79b2f5b88ccb5a7b77da5e3a33134c76..b2f231641d5ffc7776cdab6ec2f6ed284ecb5dff 100644 (file)
@@ -161,6 +161,7 @@ int main(int argc, char **argv) {
     r = omap.check(std::cout);
     if (r > 0) {
       std::cerr << "check got " << r << " error(s)" << std::endl;
+      r = 1;
       goto done;
     }
     std::cout << "check succeeded" << std::endl;
@@ -176,8 +177,10 @@ int main(int argc, char **argv) {
       std::cout << i << std::endl;
   } else {
     std::cerr << "Did not recognize command " << cmd << std::endl;
+    r = 1;
     goto done;
   }
+  r = 0;
 
   done:
   return r;