[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libguestfs
Subject:    Re: [Libguestfs] [PATCH nbdkit v2 3/4] sh: Switch nbdkit-sh-plugin to use API version 2.
From:       "Richard W.M. Jones" <rjones () redhat ! com>
Date:       2018-12-15 13:47:21
Message-ID: 20181215134721.GQ27120 () redhat ! com
[Download RAW message or body]

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

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic