From c1a6582f8c25103926a7ae2846aa8fa32534ee6e Mon Sep 17 00:00:00 2001 From: Philip Pronin Date: Wed, 21 Oct 2015 12:02:38 -0700 Subject: [PATCH] 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 --- folly/experimental/io/AsyncIO.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.34.1