static void
hvcn_cnputc(struct consdev *cp, int c)
{

	int error;

	error = 0;
	do {
		if (c == '\n') 
			error = hv_cons_putchar('\r');
	} while (error == H_EWOULDBLOCK);
	do {
		error = hv_cons_putchar(c);
	} while (error == H_EWOULDBLOCK);
}
void
hv_cnputs(char *p)
{
	int c, error;

	while ((c = *p++) != '\0') {
		if (c == '\n') {
			do {
				error = hv_cons_putchar('\r');
			} while (error == H_EWOULDBLOCK);
		}
		do {
			error = hv_cons_putchar(c);
		} while (error == H_EWOULDBLOCK);
	}
}
static void
hvcn_outwakeup(struct tty *tp)
{

	for (;;) {
		/* Refill the input buffer. */
		if (buflen == 0) {
			buflen = ttydisc_getc(tp, buf, PCBURST);
			bufindex = 0;
		}

		/* Transmit the input buffer. */
		while (buflen) {
			if (hv_cons_putchar(buf[bufindex]) == H_EWOULDBLOCK)
				return;
			bufindex++;
			buflen--;
		}
	}
}
Example #4
0
void
vcons_cnputc(dev_t dev, int c)
{
	while (hv_cons_putchar(c) == H_EWOULDBLOCK);
}