aboutsummaryrefslogtreecommitdiff
path: root/hw/block
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2014-10-07 16:00:30 +0800
committerGerd Hoffmann <kraxel@redhat.com>2014-10-15 09:52:55 +0200
commit3342ec324a7a9e4cf451968a1b320e8098410cb6 (patch)
tree437650c0e7c1caa658a5d54ea2c62f58ba4316c7 /hw/block
parent4556363087e21bedab006aa5a5803399d2277eac (diff)
downloadqemu-3342ec324a7a9e4cf451968a1b320e8098410cb6.zip
qemu-3342ec324a7a9e4cf451968a1b320e8098410cb6.tar.gz
qemu-3342ec324a7a9e4cf451968a1b320e8098410cb6.tar.bz2
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: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/block')
-rw-r--r--hw/block/virtio-blk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 45e0c8f..fd1ad3a 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -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[] = {