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

Re: [Xen-devel] [PATCH v3 5/6] tools/libxl: Extend datacopier to support reading into a buffer



On Wed, 2015-04-01 at 16:53 +0100, Ian Jackson wrote:
> >  /* onwrite==1 means failure happened when writing, logged, errnoval is 
> > valid
> >   * onwrite==0 means failure happened when reading
> > - *     errnoval==0 means we got eof and all data was written
> > - *     errnoval!=0 means we had a read error, logged
> > + *     errnoval>=0 means we got eof and all data was written or number of 
> > bytes
> > + *                 written when in read mode
> > + *     errnoval<0 means we had a read error, logged
> 
> I don't like this API.  Are you encoding a size in errnoval ?

Note that this aspect has since been reverted since it also broke
things. Ross was going to look for another way to achieve it, and this:

> Perhaps it would be better to include "bytes read" and "bytes written"
> fields in the dc state structure.

Sounds like a very plausible answer.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.