On Mon, Feb 06, 2017 at 11:00:48AM -0600, Eric Blake wrote:
On 02/06/2017 08:57 AM, Richard W.M. Jones wrote:
The callback doesn't make much sense: Could the value change per-connection? Unlikely. This is a property of the plugin as a whole.
I changed the name to "errno_is_preserved", because it's not about the reliability of errno, but about whether errno is preserved across calls.
Makes it possible for a regression in C plugins (previously, such plugins implicitly behaved as if .errno_is_preserved was 1, now such plugins default to .errno_is_preserved == 0 unless explicitly set and recompiled against newer headers). Thus, such plugins will now fail with EIO where they used to fail with reasonable errno values.
But I guess we can live with that.
Good point. However I think another point is that setting .errno_is_preserved requires some code inspection of all the error paths, and I don't think that existing binary drivers would necessarily get that right. Thanks for looking at this. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html