提交 02d3bf7f 编写于 作者: M Michael Walle

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: NMichael Walle <michael@walle.cc>
Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
上级 b2c623a3
......@@ -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);
}
}
......
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册