mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
+1
-1
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user