Re: [Qemu-devel] [RFC PATCH v1 03/25] error: Factor out common error setter logic

2015-09-11 Thread Eric Blake
On 09/10/2015 11:33 PM, Peter Crosthwaite wrote: > Currently set_error, set_error_errno, set_error_win32 do pretty much > the same thing with only a little bit of string manipulation in the > error code cases. Coreify that string manipulation as a callback and > factor out the bulk of the error_set

[Qemu-devel] [RFC PATCH v1 03/25] error: Factor out common error setter logic

2015-09-10 Thread Peter Crosthwaite
Currently set_error, set_error_errno, set_error_win32 do pretty much the same thing with only a little bit of string manipulation in the error code cases. Coreify that string manipulation as a callback and factor out the bulk of the error_set fns to a common helper that calls the callback at the ri