svn commit: r217053 - stable/8/sys/dev/xen/console
Colin Percival
cperciva at FreeBSD.org
Thu Jan 6 13:21:39 UTC 2011
Author: cperciva
Date: Thu Jan 6 13:21:38 2011
New Revision: 217053
URL: http://svn.freebsd.org/changeset/base/217053
Log:
MFC r216790: Fix Xen console spew: "no input to read" != an infinite
supply of \0 bytes.
Modified:
stable/8/sys/dev/xen/console/console.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/sys/dev/xen/console/console.c
==============================================================================
--- stable/8/sys/dev/xen/console/console.c Thu Jan 6 13:09:02 2011 (r217052)
+++ stable/8/sys/dev/xen/console/console.c Thu Jan 6 13:21:38 2011 (r217053)
@@ -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);
}
More information about the svn-src-stable-8
mailing list