From d13eea3ba11c24798a492a5609fd01f7b103592f Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 11 Aug 2021 23:24:34 +0000 Subject: [PATCH] vfio_user: Fix debug output to include reply for DeviceGetRegionInfo The reply was being printed before it had been read so it was just showing the default values. Signed-off-by: Rob Bradford --- vfio_user/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vfio_user/src/lib.rs b/vfio_user/src/lib.rs index 885455e89..d49721e2b 100644 --- a/vfio_user/src/lib.rs +++ b/vfio_user/src/lib.rs @@ -501,11 +501,11 @@ impl Client { .map_err(Error::StreamWrite)?; let mut reply = DeviceGetRegionInfo::default(); - info!("Reply: {:?}", reply); let (_, fd) = self .stream .recv_with_fd(reply.as_mut_slice()) .map_err(Error::ReceiveWithFd)?; + info!("Reply: {:?}", reply); regions.push(Region { flags: reply.region_info.flags,