summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-04-15 19:08:47 -0700
committerYehuda Sadeh <yehuda@inktank.com>2013-04-15 19:08:47 -0700
commit83ff9fecd82c55dd9f46b87687bedb9298099df5 (patch)
tree178eb806342e3b69edc287e879f4082ce27e5343
parentc1d2389d460ed39151ee67c8e2f720db910cbbdc (diff)
downloadceph-83ff9fecd82c55dd9f46b87687bedb9298099df5.tar.gz
rgw-admin: fix some more merge issues
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r--src/rgw/rgw_admin.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc
index f818a8b8449..bc876456b48 100644
--- a/src/rgw/rgw_admin.cc
+++ b/src/rgw/rgw_admin.cc
@@ -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;