On Mon, Feb 10, 2020 at 04:31:26PM -0600, Eric Blake wrote:
On 2/10/20 4:24 PM, Richard W.M. Jones wrote:
>
>The idea and patch is fine, but I wonder if it would be more useful to
>callers if it was exposed as two separate APIs. Callers would then
>not need to deal with masking out unknown flags, and it works more
>like the other is_* / can_* ("flag calls") we already have.
Fair point, especially since I exposed it in nbdkit as two callbacks
for setting the bits. Naming suggestions? Maybe nbd_is_init_sparse
and nbd_is_init_zero ?
Those make sense. As long as the name begins with "is_" or "can_"
the
generator will automatically pick it up as a "flag call" in the
documentation:
https://github.com/libguestfs/libnbd/blob/312701fa5210d79ca437cb263c706c2...
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org