From 2e323f03bfa323636552b386c982412944ff86ae Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Thu, 6 Mar 2014 16:26:02 +0800 Subject: scsi: Fix migration of scsi sense data c5f52875 changed the size of sense array in vmstate_scsi_device by mistake. This patch restores the old size, and add a subsection for the remaining part of the buffer size. So that migration is not broken. Signed-off-by: Fam Zheng Signed-off-by: Paolo Bonzini --- include/hw/scsi/scsi.h | 1 + include/migration/vmstate.h | 3 +++ 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h index e5fc39d..1adb549 100644 --- a/include/hw/scsi/scsi.h +++ b/include/hw/scsi/scsi.h @@ -31,6 +31,7 @@ typedef struct SCSISense { uint8_t ascq; } SCSISense; +#define SCSI_SENSE_BUF_SIZE_OLD 96 #define SCSI_SENSE_BUF_SIZE 252 struct SCSICommand { diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index ded8e23..e7e1705 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -650,6 +650,9 @@ extern const VMStateInfo vmstate_info_bitmap; #define VMSTATE_UINT8_ARRAY(_f, _s, _n) \ VMSTATE_UINT8_ARRAY_V(_f, _s, _n, 0) +#define VMSTATE_UINT8_SUB_ARRAY(_f, _s, _start, _num) \ + VMSTATE_SUB_ARRAY(_f, _s, _start, _num, 0, vmstate_info_uint8, uint8_t) + #define VMSTATE_UINT8_2DARRAY(_f, _s, _n1, _n2) \ VMSTATE_UINT8_2DARRAY_V(_f, _s, _n1, _n2, 0) -- cgit v1.1