Signed-off-by: Sage Weil <sage@inktank.com>
return 0;
}
+__u32 buffer::list::crc32c(__u32 crc) const
+{
+ for (std::list<ptr>::const_iterator it = _buffers.begin();
+ it != _buffers.end();
+ ++it)
+ if (it->length())
+ crc = ceph_crc32c(crc, (unsigned char*)it->c_str(), it->length());
+ return crc;
+}
void buffer::list::hexdump(std::ostream &out) const
{
ssize_t read_fd(int fd, size_t len);
int write_file(const char *fn, int mode=0644);
int write_fd(int fd) const;
- __u32 crc32c(__u32 crc) {
- for (std::list<ptr>::const_iterator it = _buffers.begin();
- it != _buffers.end();
- ++it)
- if (it->length())
- crc = ceph_crc32c(crc, (unsigned char*)it->c_str(), it->length());
- return crc;
- }
-
+ __u32 crc32c(__u32 crc) const;
};
/*