| 26 | #include <sstream> |
| 27 | |
| 28 | bool frag_t::parse(const char *s) { |
| 29 | int pvalue, pbits; |
| 30 | int r = sscanf(s, "%x/%d", &pvalue, &pbits); |
| 31 | if (r == 2) { |
| 32 | *this = frag_t(pvalue, pbits); |
| 33 | return true; |
| 34 | } |
| 35 | return false; |
| 36 | } |
| 37 | |
| 38 | void frag_t::encode(ceph::buffer::list& bl) const { |
| 39 | ceph::encode(_enc, bl); |
no test coverage detected