aboutsummaryrefslogtreecommitdiff
path: root/samples/gpio-pci-idio-16.c
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2020-09-23 04:36:41 -0400
committerThanos Makatos <thanos.makatos@nutanix.com>2020-09-23 05:11:51 -0400
commita6664824c7cdc48b8df84e021d4675def272e14d (patch)
tree53919f8f767fbdc918e3aced753a18eeedb1675e /samples/gpio-pci-idio-16.c
parent5bc6de967b641313caac2d909462e7b03412399c (diff)
downloadlibvfio-user-a6664824c7cdc48b8df84e021d4675def272e14d.zip
libvfio-user-a6664824c7cdc48b8df84e021d4675def272e14d.tar.gz
libvfio-user-a6664824c7cdc48b8df84e021d4675def272e14d.tar.bz2
refactor send/recv of message plus fixes
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples/gpio-pci-idio-16.c')
-rw-r--r--samples/gpio-pci-idio-16.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/samples/gpio-pci-idio-16.c b/samples/gpio-pci-idio-16.c
index 3eb4cf0..3c87103 100644
--- a/samples/gpio-pci-idio-16.c
+++ b/samples/gpio-pci-idio-16.c
@@ -121,8 +121,10 @@ int main(int argc, char *argv[])
return -1;
}
ret = lm_ctx_drive(lm_ctx);
- if (ret != 0 && errno != EINTR) {
- fprintf(stderr, "failed to realize device emulation: %m\n");
+ if (ret != 0) {
+ if (ret != -ENOTCONN && ret != -EINTR) {
+ fprintf(stderr, "failed to realize device emulation: %m\n");
+ }
}
out:
lm_ctx_destroy(lm_ctx);