Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-06 Thread Jamie Lokier
Gerd Hoffmann wrote: > On 04/06/10 13:05, Amit Shah wrote: > >On (Tue) Apr 06 2010 [12:21:52], Gerd Hoffmann wrote: > >>On 04/06/10 11:58, Amit Shah wrote: > >It would certainly be beneficial for consumers of virtio-serial to be > >notified of -EAGAIN so that the guest can be throttled till

Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-06 Thread Gerd Hoffmann
On 04/06/10 13:05, Amit Shah wrote: On (Tue) Apr 06 2010 [12:21:52], Gerd Hoffmann wrote: On 04/06/10 11:58, Amit Shah wrote: It would certainly be beneficial for consumers of virtio-serial to be notified of -EAGAIN so that the guest can be throttled till the chardev catches up with the data be

Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-06 Thread Amit Shah
On (Tue) Apr 06 2010 [12:21:52], Gerd Hoffmann wrote: > On 04/06/10 11:58, Amit Shah wrote: It would certainly be beneficial for consumers of virtio-serial to be notified of -EAGAIN so that the guest can be throttled till the chardev catches up with the data being sent. >>> >>> EAGAI

Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-06 Thread Gerd Hoffmann
On 04/06/10 11:58, Amit Shah wrote: It would certainly be beneficial for consumers of virtio-serial to be notified of -EAGAIN so that the guest can be throttled till the chardev catches up with the data being sent. EAGAIN should only ever occur if no bytes are written. Right. That, or just re

Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-06 Thread Amit Shah
On (Tue) Apr 06 2010 [10:34:29], Paul Brook wrote: > > On (Mon) Apr 05 2010 [17:33:38], Paul Brook wrote: > > > > There might be cases where a few bytes would have been sent out to char > > > > devices and some not. Currently the return values from qemu_chr_write() > > > > to char devs are only -1,

Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-06 Thread Paul Brook
> On (Mon) Apr 05 2010 [17:33:38], Paul Brook wrote: > > > There might be cases where a few bytes would have been sent out to char > > > devices and some not. Currently the return values from qemu_chr_write() > > > to char devs are only -1, indicating an error, or the complete length > > > of the s

Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-05 Thread Amit Shah
On (Mon) Apr 05 2010 [17:33:38], Paul Brook wrote: > > There might be cases where a few bytes would have been sent out to char > > devices and some not. Currently the return values from qemu_chr_write() > > to char devs are only -1, indicating an error, or the complete length > > of the string pass

Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-05 Thread Paul Brook
> There might be cases where a few bytes would have been sent out to char > devices and some not. Currently the return values from qemu_chr_write() > to char devs are only -1, indicating an error, or the complete length > of the string passed. > > Make 'len' a pointer instead, and indicate how muc

[Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-05 Thread Amit Shah
There might be cases where a few bytes would have been sent out to char devices and some not. Currently the return values from qemu_chr_write() to char devs are only -1, indicating an error, or the complete length of the string passed. Make 'len' a pointer instead, and indicate how much of the str