[Libguestfs] [PATCH nbdkit 3/5] protocol: Generate map functions from NBD protocol flags to printable strings.

Richard W.M. Jones rjones at redhat.com
Fri Dec 7 15:35:05 UTC 2018


On Fri, Dec 07, 2018 at 08:36:14AM -0600, Eric Blake wrote:
> 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.

Thanks Eric, pushed it now so please go ahead.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list