Amit Shah <amit.s...@redhat.com> writes: > A host chardev could close just before the guest sends some data to be > written. This will cause an -EPIPE error. This shouldn't be propagated > to virtio-serial-bus. > > Ideally we should close the port once -EPIPE is received, but since the > chardev interface doesn't return such meaningful values to its users, > all we get is -1 for any kind of error. Just return 0 for now and wait > for chardevs to return better error messages to act better on the return > messages. > > Signed-off-by: Amit Shah <amit.s...@redhat.com>
Besides qemu_chr_write() returning meaningful errors, it would be nice to have less harsh error handing in do_flush_queued_data(), wouldn't it? Short of that, we can either suppress real write errors, or turn a perfectly normal condition into an error. This patch does the latter, because it's a much lesser evil. Reviewed-by: Markus Armbruster <arm...@redhat.com>