[Libguestfs] [nbdkit PATCH] nbd: Another libnbd version bump

Richard W.M. Jones rjones at redhat.com
Thu Aug 15 15:37:07 UTC 2019


On Thu, Aug 15, 2019 at 09:27:14AM -0500, Eric Blake wrote:
> The 0.9.8 release breaks API, requiring a number of changes:
> - Use symbolic constants instead of magic numbers/open-coded strings
>   (well, the string for "base:allocation" was present before this
>   libnbd bump)
> - Change callbacks to drop the valid_flag parameter
> - Add _is to nbd_read_only call
> - Drop the _callback suffix on nbd_aio_FOO calls
> - Add a struct for managing callback/user_data at once

Seems reasonable.

> @@ -160,11 +160,12 @@ nbdplug_config (const char *key, const char *value)
>      if (strcasecmp (value, "require") == 0 ||
>          strcasecmp (value, "required") == 0 ||
>          strcasecmp (value, "force") == 0)
> -      tls = 2;
> +      tls = LIBNBD_TLS_REQUIRE;
>      else {
> -      tls = nbdkit_parse_bool (value);
> -      if (tls == -1)
> +      r = nbdkit_parse_bool (value);
> +      if (r == -1)
>          exit (EXIT_FAILURE);
> +      tls = r ? LIBNBD_TLS_ALLOW : LIBNBD_TLS_DISABLE;

Our feedback was the LIBNBD_TLS_ALLOW was really bad (I'm unconvinced
because I prefer my stuff to work and TLS very often doesn't).  Do you
think we should use REQUIRE here as well?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v




More information about the Libguestfs mailing list