Richard W.M. Jones
2019-Sep-25 08:46 UTC
Re: [Libguestfs] [PATCH libnbd] lib: Copy nbd-protocol.h from nbdkit 1.15.3.
On Tue, Sep 24, 2019 at 05:24:34PM -0500, Eric Blake wrote:> On 9/24/19 4:07 PM, Richard W.M. Jones wrote: > > /* New-style handshake server reply when using NBD_OPT_EXPORT_NAME. > > * Modern clients use NBD_OPT_GO instead of this. > > @@ -167,7 +167,7 @@ struct nbd_new_handshake_finish { > > uint64_t exportsize; > > uint16_t eflags; /* per-export flags */ > > char zeroes[124]; /* must be sent as zero bytes */ > > -} __attribute__((packed)); > > +} NBD_ATTRIBUTE_PACKED; > > Redundant type.Indeed, we don't actually use this anywhere (for obvious reasons of course). As I was only synchronizing the two headers I didn't notice. I'll remove it instead. 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
Richard W.M. Jones
2019-Sep-25 08:46 UTC
Re: [Libguestfs] [PATCH libnbd] lib: Copy nbd-protocol.h from nbdkit 1.15.3.
On Wed, Sep 25, 2019 at 09:46:13AM +0100, Richard W.M. Jones wrote:> On Tue, Sep 24, 2019 at 05:24:34PM -0500, Eric Blake wrote: > > On 9/24/19 4:07 PM, Richard W.M. Jones wrote: > > > /* New-style handshake server reply when using NBD_OPT_EXPORT_NAME. > > > * Modern clients use NBD_OPT_GO instead of this. > > > @@ -167,7 +167,7 @@ struct nbd_new_handshake_finish { > > > uint64_t exportsize; > > > uint16_t eflags; /* per-export flags */ > > > char zeroes[124]; /* must be sent as zero bytes */ > > > -} __attribute__((packed)); > > > +} NBD_ATTRIBUTE_PACKED; > > > > Redundant type. > > Indeed, we don't actually use this anywhere (for obvious reasons of > course). As I was only synchronizing the two headers I didn't notice. > I'll remove it instead.Oh I spoke too soon - we do use it in nbdkit. 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
Eric Blake
2019-Sep-25 12:21 UTC
Re: [Libguestfs] [PATCH libnbd] lib: Copy nbd-protocol.h from nbdkit 1.15.3.
On 9/25/19 3:46 AM, Richard W.M. Jones wrote:> On Wed, Sep 25, 2019 at 09:46:13AM +0100, Richard W.M. Jones wrote: >> On Tue, Sep 24, 2019 at 05:24:34PM -0500, Eric Blake wrote: >>> On 9/24/19 4:07 PM, Richard W.M. Jones wrote: >>>> /* New-style handshake server reply when using NBD_OPT_EXPORT_NAME. >>>> * Modern clients use NBD_OPT_GO instead of this. >>>> @@ -167,7 +167,7 @@ struct nbd_new_handshake_finish { >>>> uint64_t exportsize; >>>> uint16_t eflags; /* per-export flags */ >>>> char zeroes[124]; /* must be sent as zero bytes */ >>>> -} __attribute__((packed)); >>>> +} NBD_ATTRIBUTE_PACKED; >>> >>> Redundant type. >> >> Indeed, we don't actually use this anywhere (for obvious reasons of >> course). As I was only synchronizing the two headers I didn't notice. >> I'll remove it instead. > > Oh I spoke too soon - we do use it in nbdkit.It's just as easy to fix nbdkit to use a common name. I'll clean it up. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
Reasonably Related Threads
- Re: [PATCH libnbd] lib: Copy nbd-protocol.h from nbdkit 1.15.3.
- [PATCH libnbd] lib: Copy nbd-protocol.h from nbdkit 1.15.3.
- Re: [PATCH libnbd] lib: Copy nbd-protocol.h from nbdkit 1.15.3.
- [libnbd PATCH] lib: Synchronize nbd-protocol.h with nbdkit, again
- [PATCH nbdkit 4/4] common/protocol: Install <nbd-protocol.h> as a public header.