Patchwork [v4,02/10] vmdk: Make VMDK3Header and VmdkGrainMarker QEMU_PACKED

login
register
mail settings
Submitter Fam Zheng
Date Aug. 6, 2013, 7:44 a.m.
Message ID <1375775095-19456-3-git-send-email-famz@redhat.com>
Download mbox | patch
Permalink /patch/264891/
State New
Headers show

Comments

Fam Zheng - Aug. 6, 2013, 7:44 a.m.
It's best to make it consistent that all on disk structures are
QEMU_PACKED.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 block/vmdk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/block/vmdk.c b/block/vmdk.c
index f42657b..8b86fe9 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,