]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix radosgw-admin bucket_stats retcode
authorlu.shasha <lu.shasha@eisoo.com>
Wed, 24 May 2017 06:46:04 +0000 (14:46 +0800)
committerlu.shasha <lu.shasha@eisoo.com>
Wed, 24 May 2017 06:46:04 +0000 (14:46 +0800)
should check RGWBucketAdminOp::info retcode

Signed-off-by: Shasha Lu <lu.shasha@eisoo.com>
src/rgw/rgw_admin.cc

index 69ff573fcde9bf591689e04e631befb687b2c819..bcfb8075660b8322744fe2cf7cac175d60515df2 100644 (file)
@@ -4994,7 +4994,11 @@ int main(int argc, const char **argv)
   if (opt_cmd == OPT_BUCKET_STATS) {
     bucket_op.set_fetch_stats(true);
 
-    RGWBucketAdminOp::info(store, bucket_op, f);
+    int r = RGWBucketAdminOp::info(store, bucket_op, f);
+    if (r < 0) {
+      cerr << "failure: " << cpp_strerror(-r) << ": " << err << std::endl;
+      return -r;
+    }
   }
 
   if (opt_cmd == OPT_BUCKET_LINK) {