[Libguestfs] [PATCH nbdkit 3/5] protocol: Generate map functions from NBD protocol flags to printable strings.
Eric Blake
eblake at redhat.com
Fri Dec 7 14:36:14 UTC 2018
On 12/6/18 3:50 PM, Richard W.M. Jones wrote:
> This generates small functions which map from various integer NBD
> protocol flags to the string equivalent.
>
> eg:
> name_of_nbd_cmd (NBD_CMD_READ)
> ---> "NBD_CMD_READ"
>
> This commit uses some hairy sed scripting to ensure that we don't add
> any more dependencies to nbdkit.
Hairy, but well-commented. It forces some rather strict formatting to
keep things working, but we touch the file seldom enough that I don't
think that's a problem.
Series looks good to me; I'll probably post a followup to
plugins/nbd/nbd.c to also take advantage of the new functions.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
More information about the Libguestfs
mailing list