diff options
| author | Jeff Cody | 2013-09-25 18:08:51 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2013-09-25 20:51:15 +0200 |
| commit | 687fb89366366ce654a17c15af48adfe8c4ce70a (patch) | |
| tree | 0cfb02a067a417f97416f7595ac234dbb8e5a422 | |
| parent | block: qcow2 - used QEMU_PACKED for on-disk structures (diff) | |
| download | qemu-687fb89366366ce654a17c15af48adfe8c4ce70a.tar.gz qemu-687fb89366366ce654a17c15af48adfe8c4ce70a.tar.xz qemu-687fb89366366ce654a17c15af48adfe8c4ce70a.zip | |
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>
| -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 */ |
