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

virtio-blk: 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>
上级 45563630
......@@ -794,6 +794,9 @@ static void virtio_blk_instance_init(Object *obj)
(Object **)&s->blk.iothread,
qdev_prop_allow_set_link_before_realize,
OBJ_PROP_LINK_UNREF_ON_RELEASE, NULL);
device_add_bootindex_property(obj, &s->blk.conf.bootindex,
"bootindex", "/disk@0,0",
DEVICE(obj), NULL);
}
static Property virtio_blk_properties[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册