aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2012-07-30 15:16:58 -0700
committerNicholas Bellinger <nab@linux-iscsi.org>2012-07-30 15:16:58 -0700
commit6ac32975498146fd246126c0566f5e90f9280c80 (patch)
tree15af0e54873e74174f942d268c7194ff3f9a57d0
parentc9bb6eda456952b9717411fa8811ffd4eb30449f (diff)
downloadqemu-kvm-vhost-scsi.tar.gz
vhost-scsi: Make GET_ABI_VERSION use intvhost-scsi
This patch changes the GET_ABI_VERSION ioctl usage in vhost_scsi_start() to use a 'int' as requested by MST. Reported-by: Michael S. Tsirkin <mst@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Cc: Zhi Yong Wu <wuzhy@cn.ibm.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r--hw/vhost-scsi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/vhost-scsi.c b/hw/vhost-scsi.c
index 9ab314c2929..23e5632454f 100644
--- a/hw/vhost-scsi.c
+++ b/hw/vhost-scsi.c
@@ -48,7 +48,7 @@ const char *vhost_scsi_get_id(VHostSCSI *vs)
int vhost_scsi_start(VHostSCSI *vs, VirtIODevice *vdev)
{
- int ret;
+ int ret, abi_version;
struct vhost_scsi_target backend;
if (!vhost_dev_query(&vs->dev, vdev)) {
@@ -69,21 +69,21 @@ int vhost_scsi_start(VHostSCSI *vs, VirtIODevice *vdev)
}
memset(&backend, 0, sizeof(backend));
- ret = ioctl(vs->dev.control, VHOST_SCSI_GET_ABI_VERSION, &backend);
+ ret = ioctl(vs->dev.control, VHOST_SCSI_GET_ABI_VERSION, &abi_version);
if (ret < 0) {
ret = -errno;
vhost_dev_stop(&vs->dev, vdev);
return ret;
}
- if (backend.abi_version > VHOST_SCSI_ABI_VERSION) {
+ if (abi_version > VHOST_SCSI_ABI_VERSION) {
fprintf(stderr, "The running tcm_vhost kernel abi_version: %d is greater"
- " than vhost_scsi userspace supports: %d\n", backend.abi_version,
+ " than vhost_scsi userspace supports: %d\n", abi_version,
VHOST_SCSI_ABI_VERSION);
ret = -ENOSYS;
vhost_dev_stop(&vs->dev, vdev);
return ret;
}
- printf("Using TCM_Vhost ABI version: %d\n", backend.abi_version);
+ printf("Using TCM_Vhost ABI version: %d\n", abi_version);
pstrcpy((char *)backend.vhost_wwpn, sizeof(backend.vhost_wwpn), vs->wwpn);
backend.vhost_tpgt = vs->tpgt;