aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2020-06-23 08:01:56 -0700
committerThanos Makatos <thanos.makatos@nutanix.com>2020-06-23 08:01:56 -0700
commit883d8e66c0cbba493e78d4077b8c0b1b01e987d8 (patch)
treee6e4c2d7ecd0211e32b69142bdc2dff77fe8f2d8
parenta254553dac576a36f5d13125ee6c27a7e59bcd32 (diff)
downloadlibvfio-user-883d8e66c0cbba493e78d4077b8c0b1b01e987d8.zip
libvfio-user-883d8e66c0cbba493e78d4077b8c0b1b01e987d8.tar.gz
libvfio-user-883d8e66c0cbba493e78d4077b8c0b1b01e987d8.tar.bz2
improve message when VFIO client closes connection
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
-rw-r--r--lib/libmuser.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libmuser.c b/lib/libmuser.c
index 8f2f8d3..48922f8 100644
--- a/lib/libmuser.c
+++ b/lib/libmuser.c
@@ -1320,7 +1320,11 @@ drive_loop(lm_ctx_t *lm_ctx)
return err;
}
if (err == 0) {
- lm_log(lm_ctx, LM_INF, "end of file: %m\n");
+ if (errno == 0) {
+ lm_log(lm_ctx, LM_INF, "VFIO client closed connection\n");
+ } else {
+ lm_log(lm_ctx, LM_ERR, "end of file: %m\n");
+ }
break;
}