[Libguestfs] [PATCH nbdkit v2 3/4] sh: Switch nbdkit-sh-plugin to use API version 2.

Richard W.M. Jones rjones at redhat.com
Sat Dec 15 13:47:21 UTC 2018


On Sat, Dec 15, 2018 at 07:43:13AM -0600, Eric Blake wrote:
> On 12/15/18 5:01 AM, Richard W.M. Jones wrote:
> >+  case RET_FALSE:
> >+    free (s);
> >+    nbdkit_error ("%s: %s method returned unexpected code (3/false)",
> >+                  script, "can_fua");
> >+    errno = EIO;
> >+    return -1;
> >+
> 
> So you decided not to take the suggestion of a false return being
> equivalent to a successful output of "none". I can live with that.

Right, I didn't ignore it, but I'm not sure if mapping error 3 / false
to none is the right thing to do.

It seems to me that if they're returning false from this function then
they've probably not read the manual closely enough and think that
"can_fua" is a boolean function.  (Similarly if they return 0 / true
without printing anything they'll also get an error).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list