diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2015-03-11 14:31:29 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-03-11 18:24:29 +0100 |
commit | 03325525c3a607825ab67bf36bffaa5cf8447df2 (patch) | |
tree | 07bd152f6cadbd53aee93b3d9d5bd56231304a79 /include | |
parent | 2106ba30105969262a7810417a57524d9a225b91 (diff) |
virtio-scsi: fix cdb/sense size
Commit "virtio-scsi: use standard-headers" added
cdb and sense into req/rep structures, which
breaks uses of sizeof for these structures,
since qemu adds its own arrays on top.
To fix, redefine CDB/sense field size to 0.
Reported-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/virtio/virtio-scsi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h index e4b531e0d7..9423865dd5 100644 --- a/include/hw/virtio/virtio-scsi.h +++ b/include/hw/virtio/virtio-scsi.h @@ -14,6 +14,9 @@ #ifndef _QEMU_VIRTIO_SCSI_H #define _QEMU_VIRTIO_SCSI_H +/* Override CDB/sense data size: they are dynamic (guest controlled) in QEMU */ +#define VIRTIO_SCSI_CDB_SIZE 0 +#define VIRTIO_SCSI_SENSE_SIZE 0 #include "standard-headers/linux/virtio_scsi.h" #include "hw/virtio/virtio.h" #include "hw/pci/pci.h" |