Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jan 2011 13:21:38 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r217053 - stable/8/sys/dev/xen/console
Message-ID:  <201101061321.p06DLcCT016072@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101061321.p06DLcCT016072>