From: Philip Pronin Date: Wed, 21 Oct 2015 19:02:38 +0000 (-0700) Subject: fix "iocb" reporting in AsyncIO X-Git-Tag: deprecate-dynamic-initializer~306 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c1a6582f8c25103926a7ae2846aa8fa32534ee6e;p=folly.git 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 --- diff --git a/folly/experimental/io/AsyncIO.cpp b/folly/experimental/io/AsyncIO.cpp index 491db24f..3e530468 100644 --- a/folly/experimental/io/AsyncIO.cpp +++ b/folly/experimental/io/AsyncIO.cpp @@ -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;