[Libguestfs] [PATCH libnbd 0/9] Add Enum and Flags types.

Richard W.M. Jones rjones at redhat.com
Sat Aug 10 13:02:39 UTC 2019


This largish series adds several new features to the generator.

Enum maps to enumerated types (like enum in C).  The only current use
for this is replacing the nbd_set_tls (nbd, 0/1/2) parameter with
LIBNBD_TLS_DISABLE, LIBNBD_TLS_ALLOW, LIBNBD_TLS_REQUIRE (and natural
equivalents in other programming languages).

Flags maps to any uint32_t bitmask.  It is basically a non-optional,
generalized variation on OFlags with some nice features.

Two commits also add checking so that we check that the Enum, Flags or
OFlags parameters don't contain values which are invalid at the time
of compilation.  This breaks new caller / old DLL at runtime (which
may not be a bad thing).

Note that at least patch #9 and maybe even #7 and #8 are mainly being
posted for discussion.

Rich.





More information about the Libguestfs mailing list