Patchwork [v3,01/10] vmdk: Make VMDK3Header QEMU_PACKED

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

Comments

Fam Zheng - Aug. 6, 2013, 1:40 a.m.
Although the fields are all uint32_t, 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/block/vmdk.c b/block/vmdk.c
index 3756333..8ff43b9 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;