提交 aa4197c3 编写于 作者: G Gonglei 提交者: Gerd Hoffmann

virtio-net: 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: NGonglei <arei.gonglei@huawei.com>
Reviewed-by: NGerd Hoffmann <kraxel@redhat.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 12da3097
...@@ -1714,6 +1714,9 @@ static void virtio_net_instance_init(Object *obj) ...@@ -1714,6 +1714,9 @@ static void virtio_net_instance_init(Object *obj)
* Can be overriden with virtio_net_set_config_size. * Can be overriden with virtio_net_set_config_size.
*/ */
n->config_size = sizeof(struct virtio_net_config); n->config_size = sizeof(struct virtio_net_config);
device_add_bootindex_property(obj, &n->nic_conf.bootindex,
"bootindex", "/ethernet-phy@0",
DEVICE(n), NULL);
} }
static Property virtio_net_properties[] = { static Property virtio_net_properties[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册