std::ostream &operator<<(std::ostream &out, const LBAMapping &rhs)
{
- out << "LBAMapping(" << rhs.get_key() << "~" << rhs.get_length()
+ out << "LBAMapping(" << rhs.get_key()
+ << "~0x" << std::hex << rhs.get_length() << std::dec
<< "->" << rhs.get_val();
if (rhs.is_indirect()) {
- out << " indirect(" << rhs.get_intermediate_base() << "~"
- << rhs.get_intermediate_key() << "~"
- << rhs.get_intermediate_length() << ")";
+ out << ",indirect(" << rhs.get_intermediate_base()
+ << "~0x" << std::hex << rhs.get_intermediate_length()
+ << "@0x" << rhs.get_intermediate_offset() << std::dec
+ << ")";
}
out << ")";
return out;
<< ", modify_time=" << sea_time_point_printer_t{modify_time}
<< ", paddr=" << get_paddr()
<< ", prior_paddr=" << prior_poffset_str
- << ", length=" << get_length()
+ << std::hex << ", length=0x" << get_length() << std::dec
<< ", state=" << state
<< ", last_committed_crc=" << last_committed_crc
<< ", refcount=" << use_count()
} else if (_id == DEVICE_ID_ROOT) {
return out << "Dev(ROOT)";
} else {
- return out << "Dev(" << (unsigned)_id << ")";
+ return out << "Dev(0x"
+ << std::hex << (unsigned)_id << std::dec
+ << ")";
}
}
return out << "Seg[NULL]";
} else {
return out << "Seg[" << device_id_printer_t{segment.device_id()}
- << "," << segment.device_segment_id()
+ << ",0x" << std::hex << segment.device_segment_id() << std::dec
<< "]";
}
}
}
std::ostream &operator<<(std::ostream &out, const laddr_t &laddr) {
- return out << 'L' << std::hex << laddr.value << std::dec;
+ return out << "L0x" << std::hex << laddr.value << std::dec;
}
std::ostream &operator<<(std::ostream &out, const laddr_offset_t &laddr_offset) {
return out << laddr_offset.get_aligned_laddr()
- << "+" << std::hex << laddr_offset.get_offset() << std::dec;
+ << "+0x" << std::hex << laddr_offset.get_offset() << std::dec;
}
std::ostream &operator<<(std::ostream &out, const pladdr_t &pladdr)
} else if (has_device_off(id)) {
auto &s = rhs.as_res_paddr();
out << device_id_printer_t{id}
- << ","
- << s.get_device_off();
+ << ",0x"
+ << std::hex << s.get_device_off() << std::dec;
} else if (rhs.get_addr_type() == paddr_types_t::SEGMENT) {
auto &s = rhs.as_seg_paddr();
out << s.get_segment_id()
- << ","
- << s.get_segment_off();
+ << ",0x"
+ << std::hex << s.get_segment_off() << std::dec;
} else if (rhs.get_addr_type() == paddr_types_t::RANDOM_BLOCK) {
auto &s = rhs.as_blk_paddr();
out << device_id_printer_t{s.get_device_id()}
- << ","
- << s.get_device_off();
+ << ",0x"
+ << std::hex << s.get_device_off() << std::dec;
} else {
out << "INVALID!";
}