From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] tools/libxl: Fix the errno Date: Fri, 20 Mar 2015 11:15:39 +0000 Message-ID: <1426850139.21742.136.camel@citrix.com> References: <550BD79A.7020603@cn.fujitsu.com> <1426849403.21742.131.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1426849403.21742.131.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wen Congyang , Ian Jackson Cc: Andrew Cooper , xen devel , Ross Lagerwall List-Id: xen-devel@lists.xenproject.org On Fri, 2015-03-20 at 11:03 +0000, Ian Campbell wrote: > Do the new callers actually need the number of bytes read/written or was > this just something which seemed like a good idea since it was in hand? > > If it isn't needed In fact, irrespective of the needs of the future callers lets go back to the old semantics of errnoval for now, since it should be a quick and easy patch, I think. Then if it is actually needed we can sort out the propagation of the number of bytes read in a new patch as part of that series. > then lets go back to the old semantics and pass 0 on > EOF or bytes_to_read have been read (essentially "0 bytes left to > read"), I expect the recipient of the callback should know (or could > remember) the initial value of bytes_to_read? > > Otherwise I think the only sensible approach would be to add a new > parameter to the callback for the number of bytes and but errnoval back > to the old semantics. > > Or perhaps requiring a separater callback vs. pollhup_callback could > solve this too, they would have different prototypes. > > Please can one of you look into this ASAP, otherwise I think we should > revert until it can get fixed. > > Ian.