when use rados-admin to get policy with parameter --format=json:
$ radosgw-admin policy --bucket=m8x --format=json
policy information with json format should be output.
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
}
if (opt_cmd == OPT_POLICY) {
- int ret = RGWBucketAdminOp::get_policy(store, bucket_op, cout);
- if (ret >= 0) {
- cout << std::endl;
+ int ret = RGWBucketAdminOp::get_policy(store, bucket_op, f);
+ if (ret < 0) {
+ cerr << "ERROR: failed to get policy: " << cpp_strerror(-ret) << std::endl;
+ return -ret;
}
}