summaryrefslogtreecommitdiffstats
path: root/sys/dev/xen/console/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/xen/console/console.c')
-rw-r--r--sys/dev/xen/console/console.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/xen/console/console.c b/sys/dev/xen/console/console.c
index 8f765e2..d614082 100644
--- a/sys/dev/xen/console/console.c
+++ b/sys/dev/xen/console/console.c
@@ -125,17 +125,18 @@ xc_cnterm(struct consdev *cp)
static int
xc_cngetc(struct consdev *dev)
{
- int ret = (xc_mute ? 0 : -1);
+ int ret;
if (xencons_has_input())
xencons_handle_input(NULL);
CN_LOCK(cn_mtx);
- if ((rp - rc)) {
+ if ((rp - rc) && !xc_mute) {
/* we need to return only one char */
ret = (int)rbuf[RBUF_MASK(rc)];
rc++;
- }
+ } else
+ ret = -1;
CN_UNLOCK(cn_mtx);
return(ret);
}
OpenPOWER on IntegriCloud