lm32_uart/lm32_juart: use qemu_chr_fe_write_all()

qemu_chr_fe_write() may return EAGAIN. Therefore, use
qemu_chr_fe_write_all().

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Michael Walle 2013-09-16 18:29:32 +02:00
parent b2c623a3d9
commit 02d3bf7fe7
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ void lm32_juart_set_jtx(DeviceState *d, uint32_t jtx)
s->jtx = jtx;
if (s->chr) {
qemu_chr_fe_write(s->chr, &ch, 1);
qemu_chr_fe_write_all(s->chr, &ch, 1);
}
}

View File

@ -177,7 +177,7 @@ static void uart_write(void *opaque, hwaddr addr,
switch (addr) {
case R_RXTX:
if (s->chr) {
qemu_chr_fe_write(s->chr, &ch, 1);
qemu_chr_fe_write_all(s->chr, &ch, 1);
}
break;
case R_IER: