Skip to content
Snippets Groups Projects
Commit 687fb893 authored by Jeff Cody's avatar Jeff Cody Committed by Kevin Wolf
Browse files

block: qed - use QEMU_PACKED for on-disk structures


QEDHeader is read, and written, directly from on-disk images
via bdrv_pread()/write().  To avoid any unintentional padding,
these structs should be packed.

Signed-off-by: default avatarJeff Cody <jcody@redhat.com>
Reviewed-by: default avatarRichard Henderson <rth@twiddle.net>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent c4217f64
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,7 @@ typedef struct {
/* if (features & QED_F_BACKING_FILE) */
uint32_t backing_filename_offset; /* in bytes from start of header */
uint32_t backing_filename_size; /* in bytes */
} QEDHeader;
} QEMU_PACKED QEDHeader;
typedef struct {
uint64_t offsets[0]; /* in bytes */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment