From a6664824c7cdc48b8df84e021d4675def272e14d Mon Sep 17 00:00:00 2001 From: Thanos Makatos Date: Wed, 23 Sep 2020 04:36:41 -0400 Subject: refactor send/recv of message plus fixes Signed-off-by: Thanos Makatos --- samples/gpio-pci-idio-16.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'samples/gpio-pci-idio-16.c') 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); -- cgit v1.1