Commit c1a6582f authored by Philip Pronin's avatar Philip Pronin Committed by facebook-github-bot-1

fix "iocb" reporting in AsyncIO

Summary: A few fields were swapped, and we had unintentionall fallthrough in
switch.

Reviewed By: luciang

Differential Revision: D2565884

fb-gh-sync-id: 8ad71c090c5120e99c672f785aaefdef03469ee2
parent 861d07a5
......@@ -348,11 +348,13 @@ std::ostream& operator<<(std::ostream& os, const iocb& cb) {
switch (cb.aio_lio_opcode) {
case IO_CMD_PREAD:
case IO_CMD_PWRITE:
os << folly::format("buf={}, off={}, size={}, ",
cb.u.c.buf, cb.u.c.nbytes, cb.u.c.offset);
os << folly::format("buf={}, offset={}, nbytes={}, ",
cb.u.c.buf, cb.u.c.offset, cb.u.c.nbytes);
break;
default:
os << "[TODO: write debug string for "
<< iocbCmdToString(cb.aio_lio_opcode) << "] ";
break;
}
return os;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment