[Libguestfs] [PATCH nbdkit 2/9] floppy, iso, split, ssh: Use new vector type to store lists of strings.

Richard W.M. Jones rjones at redhat.com
Wed Apr 15 20:07:29 UTC 2020


On Wed, Apr 15, 2020 at 02:46:58PM -0500, Eric Blake wrote:
> On 4/15/20 11:16 AM, Richard W.M. Jones wrote:
> >These plugins have in common that they store either a list of
> >allocated strings or a list of constant strings.  Define either
> >string_vector or const_string_vector as appropriate and use it to
> >store these lists.
> >---
> 
> The commit message mentions strings...
> 
> 
> >+++ b/plugins/floppy/virtual-floppy.h
> >@@ -37,6 +37,7 @@
> >  #include <sys/stat.h>
> >  #include "regions.h"
> >+#include "vector.h"
> >  struct partition_entry {
> >    uint8_t bootable;             /* 0x00 or 0x80 if bootable */
> >@@ -130,6 +131,9 @@ struct dir_entry {
> >    uint32_t size;                /* 0x1C - file size */
> >  } __attribute__((packed));
> >+/* Appendable list of struct dir_entry. */
> >+DEFINE_VECTOR_TYPE(dir_entries, struct dir_entry);
> >+
> 
> ...but the very first usage is a struct.

Oh dear, too keen on combining what I thought were all related
commits.  I'll separate this change out.

Thanks,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list