From 5a6b5758f7abe1254648d3b18142aac62253d1dd Mon Sep 17 00:00:00 2001 From: Yan Jun Date: Wed, 22 Jun 2016 13:59:47 +0800 Subject: [PATCH] rgw: add string describing for error number Signed-off-by: Yan Jun --- src/rgw/rgw_bucket.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index 80b6a4829be84..2b03ccb3e1675 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -203,7 +203,8 @@ int rgw_link_bucket(RGWRados *store, const rgw_user& user_id, rgw_bucket& bucket if (update_entrypoint) { ret = store->get_bucket_entrypoint_info(obj_ctx, tenant_name, bucket_name, ep, &ot, NULL, &attrs); if (ret < 0 && ret != -ENOENT) { - ldout(store->ctx(), 0) << "ERROR: store->get_bucket_entrypoint_info() returned " << ret << dendl; + ldout(store->ctx(), 0) << "ERROR: store->get_bucket_entrypoint_info() returned: " + << cpp_strerror(-ret) << dendl; } } @@ -214,7 +215,7 @@ int rgw_link_bucket(RGWRados *store, const rgw_user& user_id, rgw_bucket& bucket ret = store->cls_user_add_bucket(obj, new_bucket); if (ret < 0) { ldout(store->ctx(), 0) << "ERROR: error adding bucket to directory: " - << cpp_strerror(-ret)<< dendl; + << cpp_strerror(-ret) << dendl; goto done_err; } @@ -231,7 +232,8 @@ int rgw_link_bucket(RGWRados *store, const rgw_user& user_id, rgw_bucket& bucket done_err: int r = rgw_unlink_bucket(store, user_id, bucket.tenant, bucket.name); if (r < 0) { - ldout(store->ctx(), 0) << "ERROR: failed unlinking bucket on error cleanup: " << cpp_strerror(-r) << dendl; + ldout(store->ctx(), 0) << "ERROR: failed unlinking bucket on error cleanup: " + << cpp_strerror(-r) << dendl; } return ret; } -- 2.39.5