Re: [Qemu-devel] [PATCH v1 16/16] io: add QIOChannelBuffer class

2015-09-25 Thread Daniel P. Berrange
On Fri, Sep 25, 2015 at 12:15:46PM +0200, Paolo Bonzini wrote: > > > On 18/09/2015 15:19, Daniel P. Berrange wrote: > > +if (fds || nfds) { > > +error_setg_errno(errp, EINVAL, > > + "Channel does not support buffer descriptor > > passing"); > > +return

Re: [Qemu-devel] [PATCH v1 16/16] io: add QIOChannelBuffer class

2015-09-25 Thread Paolo Bonzini
On 18/09/2015 15:19, Daniel P. Berrange wrote: > +if (fds || nfds) { > +error_setg_errno(errp, EINVAL, > + "Channel does not support buffer descriptor > passing"); > +return -1; > +} Typo (file descriptor passing) and the check could be hoisted to

[Qemu-devel] [PATCH v1 16/16] io: add QIOChannelBuffer class

2015-09-18 Thread Daniel P. Berrange
Add a QIOChannel subclass that is capable of performing I/O to/from a memory buffer. This implementation does not attempt to support concurrent readers & writers. It is designed for serialized access where by a single thread at a time may write data, seek and then read data back out. Signed-off-by