#define WRITE_CLASS_ENCODER(cl) \
- inline void encode(const cl &c, ::ceph::bufferlist &bl, uint64_t features=0) { \
+ inline void encode(const cl& c, ::ceph::buffer::list &bl, uint64_t features=0) { \
ENCODE_DUMP_PRE(); c.encode(bl); ENCODE_DUMP_POST(cl); } \
inline void decode(cl &c, ::ceph::bufferlist::const_iterator &p) { c.decode(p); }
__u8 struct_v = v; \
__u8 struct_compat = compat; \
ceph_le32 struct_len; \
- auto filler = (bl).append_hole(sizeof(struct_v) + \
+ auto filler = (bl).append_hole(sizeof(struct_v) + \
sizeof(struct_compat) + sizeof(struct_len)); \
const auto starting_bl_len = (bl).length(); \
using ::ceph::encode; \
decode(struct_v, bl); \
decode(struct_compat, bl); \
if (v < struct_compat) \
- throw buffer::malformed_input(DECODE_ERR_OLDVERSION(__PRETTY_FUNCTION__, v, struct_compat)); \
+ throw ::ceph::buffer::malformed_input(DECODE_ERR_OLDVERSION(__PRETTY_FUNCTION__, v, struct_compat)); \
__u32 struct_len; \
decode(struct_len, bl); \
if (struct_len > bl.get_remaining()) \
__u8 struct_compat; \
decode(struct_compat, bl); \
if (v < struct_compat) \
- throw buffer::malformed_input(DECODE_ERR_OLDVERSION(__PRETTY_FUNCTION__, v, struct_compat)); \
+ throw ::ceph::buffer::malformed_input(DECODE_ERR_OLDVERSION(__PRETTY_FUNCTION__, v, struct_compat)); \
} else if (skip_v) { \
if (bl.get_remaining() < skip_v) \
- throw buffer::malformed_input(DECODE_ERR_PAST(__PRETTY_FUNCTION__)); \
+ throw ::ceph::buffer::malformed_input(DECODE_ERR_PAST(__PRETTY_FUNCTION__)); \
bl.advance(skip_v); \
} \
unsigned struct_end = 0; \
__u32 struct_len; \
decode(struct_len, bl); \
if (struct_len > bl.get_remaining()) \
- throw buffer::malformed_input(DECODE_ERR_PAST(__PRETTY_FUNCTION__)); \
+ throw ::ceph::buffer::malformed_input(DECODE_ERR_PAST(__PRETTY_FUNCTION__)); \
struct_end = bl.get_off() + struct_len; \
} \
do {
__u8 struct_compat; \
decode(struct_compat, bl); \
if (v < struct_compat) \
- throw buffer::malformed_input(DECODE_ERR_OLDVERSION( \
+ throw ::ceph::buffer::malformed_input(DECODE_ERR_OLDVERSION( \
__PRETTY_FUNCTION__, v, struct_compat)); \
} \
unsigned struct_end = 0; \
__u32 struct_len; \
decode(struct_len, bl); \
if (struct_len > bl.get_remaining()) \
- throw buffer::malformed_input(DECODE_ERR_PAST(__PRETTY_FUNCTION__)); \
+ throw ::ceph::buffer::malformed_input(DECODE_ERR_PAST(__PRETTY_FUNCTION__)); \
struct_end = bl.get_off() + struct_len; \
} \
do {
} while (false); \
if (struct_end) { \
if (bl.get_off() > struct_end) \
- throw buffer::malformed_input(DECODE_ERR_PAST(__PRETTY_FUNCTION__)); \
+ throw ::ceph::buffer::malformed_input(DECODE_ERR_PAST(__PRETTY_FUNCTION__)); \
if (bl.get_off() < struct_end) \
bl.advance(struct_end - bl.get_off()); \
}
bufferlist bl;
__u32 len = 0;
bl.read_fd(fd, sizeof(len));
- decode(len, bl);
+ decode(len, bl);
bl.read_fd(fd, len);
- decode(str, bl);
+ decode(str, bl);
return bl.length();
}