Author: cperciva Date: Wed Dec 29 05:13:21 2010 New Revision: 216790 URL: http://svn.freebsd.org/changeset/base/216790
Log: A lack of console input is not the same thing as a byte of \0 input. Correctly return -1 from cngetc when no input is available to be read. This fixes the '(CTRL-C to abort)' spam while dumping. MFC after: 3 days Modified: head/sys/dev/xen/console/console.c Modified: head/sys/dev/xen/console/console.c ============================================================================== --- head/sys/dev/xen/console/console.c Wed Dec 29 04:17:50 2010 (r216789) +++ head/sys/dev/xen/console/console.c Wed Dec 29 05:13:21 2010 (r216790) @@ -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); } _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"