aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi/vhost-scsi.c
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2015-01-29 15:08:52 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2015-02-11 21:47:51 +0100
commitd4433f32116dc597f895e62cde3572b400c3ee96 (patch)
tree9b2e19bafaac0b411fff77095dee6b9b37921d4f /hw/scsi/vhost-scsi.c
parent0be63901d2a33a6ed25caa5df3f530df75338f6a (diff)
downloadqemu-d4433f32116dc597f895e62cde3572b400c3ee96.zip
qemu-d4433f32116dc597f895e62cde3572b400c3ee96.tar.gz
qemu-d4433f32116dc597f895e62cde3572b400c3ee96.tar.bz2
vhost-scsi: add bootindex property
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/vhost-scsi.c')
-rw-r--r--hw/scsi/vhost-scsi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index dcb2bc5..9c4f613 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -290,11 +290,20 @@ static void vhost_scsi_class_init(ObjectClass *klass, void *data)
vdc->set_status = vhost_scsi_set_status;
}
+static void vhost_scsi_instance_init(Object *obj)
+{
+ VHostSCSI *dev = VHOST_SCSI(obj);
+
+ device_add_bootindex_property(obj, &dev->bootindex, "bootindex", NULL,
+ DEVICE(dev), NULL);
+}
+
static const TypeInfo vhost_scsi_info = {
.name = TYPE_VHOST_SCSI,
.parent = TYPE_VIRTIO_SCSI_COMMON,
.instance_size = sizeof(VHostSCSI),
.class_init = vhost_scsi_class_init,
+ .instance_init = vhost_scsi_instance_init,
};
static void virtio_register_types(void)