[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v10 24/30] scsi: add bootindex to qom property
From: |
arei.gonglei |
Subject: |
[Qemu-devel] [PATCH v10 24/30] scsi: add bootindex to qom property |
Date: |
Fri, 12 Sep 2014 17:35:26 +0800 |
From: Gonglei <address@hidden>
Add a qom property with the same name 'bootindex',
when we remove it form qdev property, things will
continue to work just fine, and we can use qom features
which are not supported by qdev property.
Signed-off-by: Gonglei <address@hidden>
---
hw/scsi/scsi-bus.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 954c607..2a37d78 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -1997,6 +1997,16 @@ static void scsi_device_class_init(ObjectClass *klass,
void *data)
k->props = scsi_props;
}
+static void scsi_dev_instance_init(Object *obj)
+{
+ DeviceState *dev = DEVICE(obj);
+ SCSIDevice *s = DO_UPCAST(SCSIDevice, qdev, dev);
+
+ device_add_bootindex_property(obj, &s->conf.bootindex,
+ "bootindex", NULL,
+ &s->qdev, NULL);
+}
+
static const TypeInfo scsi_device_type_info = {
.name = TYPE_SCSI_DEVICE,
.parent = TYPE_DEVICE,
@@ -2004,6 +2014,7 @@ static const TypeInfo scsi_device_type_info = {
.abstract = true,
.class_size = sizeof(SCSIDeviceClass),
.class_init = scsi_device_class_init,
+ .instance_init = scsi_dev_instance_init,
};
static void scsi_register_types(void)
--
1.7.12.4
- [Qemu-devel] [PATCH v10 13/30] rtl8139: add bootindex to qom property, (continued)
- [Qemu-devel] [PATCH v10 13/30] rtl8139: add bootindex to qom property, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 12/30] pcnet: add bootindex to qom property, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 14/30] spapr_lian: add bootindex to qom property, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 16/30] usb-net: add bootindex to qom property, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 15/30] vmxnet3: add bootindex to qom property, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 18/30] virtio-net: alias bootindex property explicitly for virt-net-pci/ccw/s390, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 17/30] net: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 19/30] host-libusb: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 20/30] pci-assign: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 22/30] redirect: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 24/30] scsi: add bootindex to qom property,
arei.gonglei <=
- [Qemu-devel] [PATCH v10 27/30] block: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 23/30] isa-fdc: remove bootindexA/B property from qdev to qom, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 25/30] ide: add bootindex to qom property, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 26/30] virtio-blk: add bootindex to qom property, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 28/30] ide: add calling add_boot_device_patch in bootindex setter function, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 29/30] bootindex: move calling add_boot_device_patch to bootindex setter function, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 30/30] bootindex: delete bootindex when device is removed, arei.gonglei, 2014/09/12
- [Qemu-devel] [PATCH v10 21/30] vfio: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/12
- Re: [Qemu-devel] [PATCH v10 00/30] modify boot order of guest, and take effect after rebooting, Gerd Hoffmann, 2014/09/12