This was a recent behavior change.
It might be tempting to normalize these, but I'm trying to avoid further
changes in result codes.
Fixes: https://tracker.ceph.com/issues/55975
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
} \
} while (0)
+static inline int posix_errortrans(int r)
+{
+ switch(r) {
+ case ERR_NO_SUCH_BUCKET:
+ r = ENOENT;
+ break;
+ default:
+ break;
+ }
+ return r;
+}
+
void usage()
{
cout << "usage: radosgw-admin <cmd> [options...]" << std::endl;
int r = RGWBucketAdminOp::info(store, bucket_op, stream_flusher, null_yield, dpp());
if (r < 0) {
cerr << "failure: " << cpp_strerror(-r) << ": " << err << std::endl;
- return -r;
+ return posix_errortrans(-r);
}
}