Date: Mon, 29 May 2006 21:58:19 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 98102 for review Message-ID: <200605292158.k4TLwJJB027002@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=98102 Change 98102 by kmacy@kmacy_storage:sun4v_work on 2006/05/29 21:58:01 we have no way of redriving a putc, so keep calling putchar until EWOULDBLOCK is not returned Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hvcons.c#4 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hvcons.c#4 (text+ko) ==== @@ -239,15 +239,18 @@ static void hvcnputc(struct consdev *cp, int c) { - char cbuf; + + int error; - if (c == '\n') { - cbuf = '\r'; - hv_cnputchar(cbuf); - } + error = 0; - cbuf = c; - hv_cnputchar(cbuf); + do { + if (c == '\n') + error = hv_cnputchar('\r'); + } while (error == H_EWOULDBLOCK); + do { + error = hv_cnputchar(c); + } while (error == H_EWOULDBLOCK); } static int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605292158.k4TLwJJB027002>