{
int sign = (r < 0 ? -1 : 1);
int err = std::abs(r);
- if (err < 256 && hostos_to_ceph_conv[err] !=0 ) {
+ if (err < 256 && ceph_to_hostos_conv[err] !=0 ) {
err = ceph_to_hostos_conv[err];
}
return err * sign;
// cppcheck-suppress noExplicitConstructor
errorcode32_t(int32_t i) : code(i) {}
- operator int() const { return code; }
- int operator==(int i) {
- return code==i;
- }
+ operator int() const { return code; }
+ int* operator&() { return &code; }
+ int operator==(int i) { return code == i; }
+ int operator>(int i) { return code > i; }
+ int operator>=(int i) { return code >= i; }
+ int operator<(int i) { return code < i; }
+ int operator<=(int i) { return code <= i; }
void encode(bufferlist &bl) const {
__s32 newcode = hostos_to_ceph_errno(code);
sobject_t soid;
bufferlist indata, outdata;
- int32_t rval;
+ errorcode32_t rval;
OSDOp() : rval(0) {
memset(&op, 0, sizeof(ceph_osd_op));