aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2011-01-06 22:54:48 +0000
committerColin Percival <cperciva@FreeBSD.org>2011-01-06 22:54:48 +0000
commitaf0dacb52530043ec6ee548cc02103da5164970a (patch)
treed6a2a650d94a7b03c261afc006c116f250423715 /sys
parent826cbb729ba49fbb25939d500ccaace655910fe4 (diff)
Notes
Diffstat (limited to 'sys')
-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 44a4fb356a80..4b624ee23a02 100644
--- a/sys/dev/xen/console/console.c
+++ b/sys/dev/xen/console/console.c
@@ -145,17 +145,18 @@ xccngetc(struct consdev *dev)
int
xccncheckc(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);
}