From 8368febd81cbf3cc71f5b0e92ef36e482dff37ca Mon Sep 17 00:00:00 2001 From: Jeff Cody <jcody@redhat.com> Date: Wed, 25 Sep 2013 12:08:48 -0400 Subject: [PATCH] block: vdi - use QEMU_PACKED for on-disk structures The header struct VdiHeader is an on-disk structure for the image format, and as such should be packed. Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com> --- block/vdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vdi.c b/block/vdi.c index dcbc27c9cb..b6ec0020dc 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -165,7 +165,7 @@ typedef struct { uuid_t uuid_link; uuid_t uuid_parent; uint64_t unused2[7]; -} VdiHeader; +} QEMU_PACKED VdiHeader; typedef struct { /* The block map entries are little endian (even in memory). */