diff options
| author | Colin Percival <cperciva@FreeBSD.org> | 2010-12-29 05:13:21 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2010-12-29 05:13:21 +0000 |
| commit | eb68ccd676774c4be94deb11b56ced0889f15ea6 (patch) | |
| tree | c2d336ad5a469f8d0c561c2e36311ff4e7edcd07 /sys/dev/xen | |
| parent | bd2fa726e0b6ef09e52a71251be5978a04637411 (diff) | |
Notes
Diffstat (limited to 'sys/dev/xen')
| -rw-r--r-- | sys/dev/xen/console/console.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/xen/console/console.c b/sys/dev/xen/console/console.c index 8f765e20c653..d61408284800 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); } |
