PERFORCE change 98102 for review

Kip Macy kmacy at FreeBSD.org
Mon May 29 14:59:49 PDT 2006


http://perforce.freebsd.org/chv.cgi?CH=98102

Change 98102 by kmacy at 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


More information about the p4-projects mailing list