From owner-svn-src-stable@FreeBSD.ORG Thu Jan 6 13:21:39 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1429C1065694; Thu, 6 Jan 2011 13:21:39 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02B708FC08; Thu, 6 Jan 2011 13:21:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p06DLcBg016074; Thu, 6 Jan 2011 13:21:38 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p06DLcCT016072; Thu, 6 Jan 2011 13:21:38 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201101061321.p06DLcCT016072@svn.freebsd.org> From: Colin Percival Date: Thu, 6 Jan 2011 13:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217053 - stable/8/sys/dev/xen/console X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jan 2011 13:21:39 -0000 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); }