<< ((i.flags & CEPH_SUBSCRIBE_ONETIME) ? "" : "+");
}
-enum health_status_t {
- HEALTH_ERR = 0,
- HEALTH_WARN = 1,
- HEALTH_OK = 2,
-};
-
-#ifdef __cplusplus
-inline ostream& operator<<(ostream &oss, const health_status_t status) {
- switch (status) {
- case HEALTH_ERR:
- oss << "HEALTH_ERR";
- break;
- case HEALTH_WARN:
- oss << "HEALTH_WARN";
- break;
- case HEALTH_OK:
- oss << "HEALTH_OK";
- break;
- }
- return oss;
-}
-#endif
-
struct weightf_t {
float v;
// cppcheck-suppress noExplicitConstructor
// 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);