Blob Blame History Raw
From 48eeebecb8133d687cd86f33e1b9cee71baa2d35 Mon Sep 17 00:00:00 2001
From: Fam Zheng <famz@redhat.com>
Date: Tue, 6 Aug 2013 15:44:47 +0800
Subject: [PATCH 01/13] vmdk: Make VMDK3Header and VmdkGrainMarker QEMU_PACKED

Message-id: <1377573001-27070-2-git-send-email-famz@redhat.com>
Patchwork-id: 53781
O-Subject: [RHEL-7 qemu-kvm PATCH 01/13] vmdk: Make VMDK3Header and
        VmdkGrainMarker QEMU_PACKED
Bugzilla: 995866
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>

It's best to make it consistent that all on disk structures are
QEMU_PACKED.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 5d8caa543c9714bee36b04899797a3721dff4090)
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 block/vmdk.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/vmdk.c b/block/vmdk.c
index f0c1f93..e85f4ea 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -62,7 +62,7 @@ typedef struct {
     uint32_t cylinders;
     uint32_t heads;
     uint32_t sectors_per_track;
-} VMDK3Header;
+} QEMU_PACKED VMDK3Header;
 
 typedef struct {
     uint32_t version;
@@ -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.7.1