Re: [Xen-devel] [PATCH v3 02/25] chardev: Assert IOCanReadHandler can not be negative

2019-02-21 Thread Philippe Mathieu-Daudé
On 2/20/19 12:13 PM, Philippe Mathieu-Daudé wrote: > On 2/20/19 11:03 AM, Marc-André Lureau wrote: >> Hi >> >> On Wed, Feb 20, 2019 at 2:03 AM Philippe Mathieu-Daudé >> wrote: >>> >>> The backend should not return a negative length to read. >>> We will later change the prototype of

Re: [Xen-devel] [PATCH v3 02/25] chardev: Assert IOCanReadHandler can not be negative

2019-02-20 Thread Philippe Mathieu-Daudé
On 2/20/19 11:03 AM, Marc-André Lureau wrote: > Hi > > On Wed, Feb 20, 2019 at 2:03 AM Philippe Mathieu-Daudé > wrote: >> >> The backend should not return a negative length to read. >> We will later change the prototype of IOCanReadHandler to return an >> unsigned length. Meanwhile make sure the

Re: [Xen-devel] [PATCH v3 02/25] chardev: Assert IOCanReadHandler can not be negative

2019-02-20 Thread Marc-André Lureau
Hi On Wed, Feb 20, 2019 at 2:03 AM Philippe Mathieu-Daudé wrote: > > The backend should not return a negative length to read. > We will later change the prototype of IOCanReadHandler to return an > unsigned length. Meanwhile make sure the return length is positive. > > Suggested-by: Paolo

[Xen-devel] [PATCH v3 02/25] chardev: Assert IOCanReadHandler can not be negative

2019-02-19 Thread Philippe Mathieu-Daudé
The backend should not return a negative length to read. We will later change the prototype of IOCanReadHandler to return an unsigned length. Meanwhile make sure the return length is positive. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- chardev/char.c | 5 - 1