qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH] chardev: Convert IOReadHandler to re


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH] chardev: Convert IOReadHandler to read an unsigned number of bytes
Date: Thu, 11 Oct 2018 17:24:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 11/10/2018 17:14, Paolo Bonzini wrote:
> On 11/10/2018 15:14, Philippe Mathieu-Daudé wrote:
>> The number of bytes can not be negative nor zero.
>>
>> Fixed 2 format string:
>> - hw/char/spapr_vty.c
>> - hw/usb/ccid-card-passthru.c
>>
>> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
>> ---
>> See: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02212.html
> 
> Not that easy; you need to adjust qemu_chr_be_can_write,
> qemu_chr_be_write_impl, qemu_chr_be_write (which is where the callbacks
> are invoked).

OK.

> On the other hand, fd_chr_read_poll is not an IOCanReadHandler, and this
> patch therefore probably doesn't compile?

It does compile.

fd_chr_update_read_handler() uses fd_chr_read_poll with io_add_watch_poll():

GSource *io_add_watch_poll(Chardev *chr,
                        QIOChannel *ioc,
                        IOCanReadHandler *fd_can_read,
                        QIOChannelFunc fd_read,
                        gpointer user_data,
                        GMainContext *context);



reply via email to

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