Re: [Qemu-devel] [PATCH] util/error: Save errno from clobbering

2013-11-08 Thread Stefan Hajnoczi
On Thu, Nov 07, 2013 at 08:10:29PM +0100, Max Reitz wrote: There may be calls to error_setg() and especially error_setg_errno() which blindly (and until now wrongly) assume these functions not to clobber errno (e.g., they pass errno to error_setg_errno() and return -errno afterwards). Instead

[Qemu-devel] [PATCH] util/error: Save errno from clobbering

2013-11-07 Thread Max Reitz
There may be calls to error_setg() and especially error_setg_errno() which blindly (and until now wrongly) assume these functions not to clobber errno (e.g., they pass errno to error_setg_errno() and return -errno afterwards). Instead of trying to find and fix all of these constructs, just make

Re: [Qemu-devel] [PATCH] util/error: Save errno from clobbering

2013-11-07 Thread Benoît Canet
Le Thursday 07 Nov 2013 à 20:10:29 (+0100), Max Reitz a écrit : There may be calls to error_setg() and especially error_setg_errno() which blindly (and until now wrongly) assume these functions not to clobber errno (e.g., they pass errno to error_setg_errno() and return -errno afterwards).

Re: [Qemu-devel] [PATCH] util/error: Save errno from clobbering

2013-11-07 Thread Eric Blake
On 11/07/2013 12:10 PM, Max Reitz wrote: There may be calls to error_setg() and especially error_setg_errno() which blindly (and until now wrongly) assume these functions not to clobber errno (e.g., they pass errno to error_setg_errno() and return -errno afterwards). Instead of trying to find