Patchwork [v3,02/10] vmdk: Make VmdkGrainMarker QEMU_PACKED

login
register
mail settings
Submitter Fam Zheng
Date Aug. 6, 2013, 1:40 a.m.
Message ID <1375753243-19530-3-git-send-email-famz@redhat.com>
Download mbox | patch
Permalink /patch/264835/
State New
Headers show

Comments

Fam Zheng - Aug. 6, 2013, 1:40 a.m.
For consistency, make this on disk structure QEMU_PACKED.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 block/vmdk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Jeff Cody - Aug. 6, 2013, 3:24 a.m.
On Tue, Aug 06, 2013 at 09:40:35AM +0800, Fam Zheng wrote:
> For consistency, make this on disk structure QEMU_PACKED.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  block/vmdk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

I don't think this makes it necessary for a respin, but if you do one
anyway, I would suggest squashing this patch and patch 1 together.

> diff --git a/block/vmdk.c b/block/vmdk.c
> index 8ff43b9..7ebe36b 100644
> --- a/block/vmdk.c
> +++ b/block/vmdk.c
> @@ -131,7 +131,7 @@ typedef struct VmdkGrainMarker {
>      uint64_t lba;
>      uint32_t size;
>      uint8_t  data[0];
> -} VmdkGrainMarker;
> +} QEMU_PACKED VmdkGrainMarker;
>  
>  enum {
>      MARKER_END_OF_STREAM    = 0,
> -- 
> 1.8.3.4
>

Patch

diff --git a/block/vmdk.c b/block/vmdk.c
index 8ff43b9..7ebe36b 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -131,7 +131,7 @@  typedef struct VmdkGrainMarker {
     uint64_t lba;
     uint32_t size;
     uint8_t  data[0];
-} VmdkGrainMarker;
+} QEMU_PACKED VmdkGrainMarker;
 
 enum {
     MARKER_END_OF_STREAM    = 0,