[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw/char/serial: Only retry if qemu_chr_fe_write

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] hw/char/serial: Only retry if qemu_chr_fe_write returns 0
Date: Mon, 9 Jul 2018 15:17:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 09/07/2018 14:23, Marc-André Lureau wrote:
> I suppose the patch should also change qemu_chr_fe_write() to
> qemu_chr_fe_write_all() to be complete and let the chardev handle

No, using qemu_chr_fe_write_all() is even more wrong, because hw/char
devices should never block (and hw/char/serial.c handles flow control

However, indeed it seems to me that the logic of the patch is backwards:

- -1/EAGAIN should retry

- 0 should *not* retry, because it means the other side has hung up

- everything else should not retry.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]