qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC 2/3] s390x: Fix hanging SCLP line mode console


From: Heinz Graalfs
Subject: [Qemu-devel] [RFC 2/3] s390x: Fix hanging SCLP line mode console
Date: Fri, 24 Oct 2014 10:13:46 +0200

Exploit the new can_read timeout infrastructure in order to avoid
hangs when no further activity happens on the main thread.

Signed-off-by: Heinz Graalfs <address@hidden>
---
 hw/char/sclpconsole-lm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c
index 80dd0a9..3575ef2 100644
--- a/hw/char/sclpconsole-lm.c
+++ b/hw/char/sclpconsole-lm.c
@@ -60,11 +60,11 @@ static int chr_can_read(void *opaque)
     SCLPConsoleLM *scon = opaque;
 
     if (scon->event.event_pending) {
-        return 0;
+        return -EAGAIN;
     } else if (SIZE_CONSOLE_BUFFER - scon->length) {
         return 1;
     }
-    return 0;
+    return -EAGAIN;
 }
 
 static void chr_read(void *opaque, const uint8_t *buf, int size)
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]