]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw-admin: fix some more merge issues
authorYehuda Sadeh <yehuda@inktank.com>
Tue, 16 Apr 2013 02:08:47 +0000 (19:08 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Wed, 8 May 2013 17:57:46 +0000 (10:57 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_admin.cc

index f818a8b844964d92d3ae6fd9dc2bcf3a63487dbb..bc876456b487c47cdb35299ff4424ca39c0df0e5 100644 (file)
@@ -1628,6 +1628,15 @@ next:
   }
 
   if (opt_cmd == OPT_BILOG_LIST) {
+    if (bucket_name.empty()) {
+      cerr << "ERROR: bucket not specified" << std::endl;
+      return -EINVAL;
+    }
+    int ret = init_bucket(bucket_name, bucket);
+    if (ret < 0) {
+      cerr << "ERROR: could not init bucket: " << cpp_strerror(-ret) << std::endl;
+      return -ret;
+    }
     formatter->open_array_section("entries");
     bool truncated;
     int count = 0;
@@ -1636,7 +1645,7 @@ next:
 
     do {
       list<rgw_bi_log_entry> entries;
-      int ret = store->list_bi_log_entries(bucket, marker, max_entries - count, entries, &truncated);
+      ret = store->list_bi_log_entries(bucket, marker, max_entries - count, entries, &truncated);
       if (ret < 0) {
         cerr << "ERROR: list_bi_log_entries(): " << cpp_strerror(-ret) << std::endl;
         return -ret;