From c4217f645dfdfd405cd0c50af953515e1114436a Mon Sep 17 00:00:00 2001 From: Jeff Cody Date: Wed, 25 Sep 2013 12:08:50 -0400 Subject: block: qcow2 - used QEMU_PACKED for on-disk structures QCowHeader and QCowExtension are structs that reside in the on-disk image format, and are read and written directly via bdrv_pread()/write(), and as such should be packed to avoid any unintentional struct padding. Signed-off-by: Jeff Cody Reviewed-by: Richard Henderson Signed-off-by: Kevin Wolf --- block/qcow2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/qcow2.h') diff --git a/block/qcow2.h b/block/qcow2.h index c90e5d6c6e..455e38de64 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -86,7 +86,7 @@ typedef struct QCowHeader { uint32_t refcount_order; uint32_t header_length; -} QCowHeader; +} QEMU_PACKED QCowHeader; typedef struct QCowSnapshot { uint64_t l1_table_offset; -- cgit v1.2.3