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

Re: [Xen-devel] [PATCH 10/13] libxl: don't try to fclose file twice on error in libxl_userdata_store



On Tue, Dec 3, 2013 at 1:14 AM, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> wrote:
> Matthew Daley writes ("[PATCH 10/13] libxl: don't try to fclose file twice on 
> error in libxl_userdata_store"):
>> Do this by changing the function to not use stdio file operations, but
>> just use write(2) directly.
>
> This is not correct.  If you use write(2) directly you have to call it
> in a loop, in case of partial writes.  This is quite tiresome.  I
> think it would be better to simply fix the function not to "retry" the
> fclose if it fails the first time.

Would using libxl_write_exactly be acceptable instead?

>
>> While at it, tidy up the function's style issues.
>
> This makes the result very hard to review.  It is better to split
> nonfunctional changes out into their own patch.

Sorry, will do.

- Matthew

_______________________________________________
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®.