diff options
author | Jeff Cody <jcody@redhat.com> | 2013-09-25 12:08:51 -0400 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-09-25 20:51:15 +0200 |
commit | 687fb89366366ce654a17c15af48adfe8c4ce70a (patch) | |
tree | 0cfb02a067a417f97416f7595ac234dbb8e5a422 /block/qed.h | |
parent | c4217f645dfdfd405cd0c50af953515e1114436a (diff) |
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: Jeff Cody <jcody@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qed.h')
-rw-r--r-- | block/qed.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qed.h b/block/qed.h index 2b4ddedf31..5d65bea075 100644 --- a/block/qed.h +++ b/block/qed.h @@ -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 */ |