>>> Stefano Stabellini <sstabell...@kernel.org> 03/27/17 10:54 PM >>>
>On Mon, 27 Mar 2017, Jan Beulich wrote:
>> >>> On 24.03.17 at 19:31, <sstabell...@kernel.org> wrote:
>> > +/*
>> > + * See docs/misc/9pfs.markdown in xen.git for the full specification:
>> > + * https://xenbits.xen.org/docs/unstable/misc/9pfs.html 
>> > + */
>> > +#pragma pack(push)
>> > +#pragma pack(1)
>> > +struct xen_9pfs_header {
>> > +  uint32_t size;
>> > +  uint8_t id;
>> > +  uint16_t tag;
>> > +};
>> > +#pragma pack(pop)
>> 
>> There's no precedent to using pragmas in the public headers, and
>> these aren't C99-compliant.
>
>I'll remove pragma, together with the definition of struct
>xen_9pfs_header: this structure is already defined as part of the 9p
>protocol, and it is already mentioned in the Xen 9pfs transport spec as
>well. In fact, both QEMU and Linux already have it defined. I don't
>think we need it here.

That'll deal with the immediate issue here, but not with the more general
implied one: Why would you want to have misaligned fields in a protocol
definition?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to