aboutsummaryrefslogtreecommitdiff
path: root/hw/net
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2014-10-07 16:00:18 +0800
committerGerd Hoffmann <kraxel@redhat.com>2014-10-15 09:52:54 +0200
commitdfe79cf268ce78a8b821084c91f801e879543992 (patch)
treeec39193e70074b491e58e7c8b4ef5e0c4fd03c20 /hw/net
parentafd7c850f58b93ab7ff311cfcbac0952ee53e632 (diff)
spapr_lian: add bootindex to qom property
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 <arei.gonglei@huawei.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r--hw/net/spapr_llan.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c
index 23c47d397c..0ff159bfc0 100644
--- a/hw/net/spapr_llan.c
+++ b/hw/net/spapr_llan.c
@@ -226,6 +226,15 @@ static int spapr_vlan_init(VIOsPAPRDevice *sdev)
return 0;
}
+static void spapr_vlan_instance_init(Object *obj)
+{
+ VIOsPAPRVLANDevice *dev = VIO_SPAPR_VLAN_DEVICE(obj);
+
+ device_add_bootindex_property(obj, &dev->nicconf.bootindex,
+ "bootindex", "",
+ DEVICE(dev), NULL);
+}
+
void spapr_vlan_create(VIOsPAPRBus *bus, NICInfo *nd)
{
DeviceState *dev;
@@ -553,6 +562,7 @@ static const TypeInfo spapr_vlan_info = {
.parent = TYPE_VIO_SPAPR_DEVICE,
.instance_size = sizeof(VIOsPAPRVLANDevice),
.class_init = spapr_vlan_class_init,
+ .instance_init = spapr_vlan_instance_init,
};
static void spapr_vlan_register_types(void)