rgw-admin: link / unlink should report errors

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
Yehuda Sadeh 2013-07-17 16:14:02 -07:00 committed by Greg Farnum
parent 0024e5aa22
commit e4d2787b02

View File

@ -1387,11 +1387,19 @@ int main(int argc, char **argv)
}
if (opt_cmd == OPT_BUCKET_LINK) {
RGWBucketAdminOp::link(store, bucket_op);
int r = RGWBucketAdminOp::link(store, bucket_op);
if (r < 0) {
cerr << "failure: " << cpp_strerror(-r) << std::endl;
return -r;
}
}
if (opt_cmd == OPT_BUCKET_UNLINK) {
RGWBucketAdminOp::unlink(store, bucket_op);
int r = RGWBucketAdminOp::unlink(store, bucket_op);
if (r < 0) {
cerr << "failure: " << cpp_strerror(-r) << std::endl;
return -r;
}
}
if (opt_cmd == OPT_TEMP_REMOVE) {