Skip to content

Commit

Permalink
block: vdi - use QEMU_PACKED for on-disk structures
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
codyprime authored and kevmw committed Sep 25, 2013
1 parent 9e6337d commit 8368feb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/vdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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). */
Expand Down

0 comments on commit 8368feb

Please sign in to comment.