#include "common/config.h"
#include "common/ceph_argparse.h"
#include "common/common_init.h"
+#include "common/errno.h"
#include "common/armor.h"
#include "rgw_user.h"
ret = get_random_bytes(buf, sizeof(buf));
if (ret < 0) {
- // assuming no threads here, for strerror
- cerr << "cannot get random bytes: " << strerror(-ret) << std::endl;
+ cerr << "cannot get random bytes: " << cpp_strerror(-ret) << std::endl;
return -1;
}
{
int ret = get_random_bytes(dest, size);
if (ret < 0) {
- // assuming no threads here, for strerror
- cerr << "cannot get random bytes: " << strerror(-ret) << std::endl;
+ cerr << "cannot get random bytes: " << cpp_strerror(-ret) << std::endl;
return -1;
}
info.openstack_name = openstack_user;
if ((err = rgw_store_user_info(info)) < 0) {
- cerr << "error storing user info: " << strerror(-err) << std::endl;
+ cerr << "error storing user info: " << cpp_strerror(-err) << std::endl;
break;
}
uint64_t size;
int r = store->obj_stat(log_bucket, oid, &size, NULL);
if (r < 0) {
- cerr << "error while doing stat on " << log_bucket << ":" << oid << " " << strerror(-r) << std::endl;
+ cerr << "error while doing stat on " << log_bucket << ":" << oid
+ << " " << cpp_strerror(-r) << std::endl;
return -r;
}
bufferlist bl;
r = store->read(log_bucket, oid, 0, size, bl);
if (r < 0) {
- cerr << "error while reading from " << log_bucket << ":" << oid << " " << strerror(-r) << std::endl;
+ cerr << "error while reading from " << log_bucket << ":" << oid
+ << " " << cpp_strerror(-r) << std::endl;
return -r;
}
#include <string>
#include <map>
+#include "common/errno.h"
#include "rgw_access.h"
#include "rgw_acl.h"
ret = rgwstore->tmap_set(ui_bucket, buckets_obj_id, bucket_name, bl);
if (ret < 0) {
- RGW_LOG(0) << "error adding bucket to directory: " << strerror(-ret)<< std::endl;
+ RGW_LOG(0) << "error adding bucket to directory: "
+ << cpp_strerror(-ret)<< std::endl;
}
} else {
RGWUserBuckets buckets;
ret = rgwstore->tmap_del(ui_bucket, buckets_obj_id, bucket_name);
if (ret < 0) {
- RGW_LOG(0) << "error removing bucket from directory: " << strerror(-ret)<< std::endl;
+ RGW_LOG(0) << "error removing bucket from directory: "
+ << cpp_strerror(-ret)<< std::endl;
}
} else {
RGWUserBuckets buckets;