From: Gonglei Date: Tue, 7 Oct 2014 08:00:30 +0000 (+0800) Subject: virtio-blk: add bootindex to qom property X-Git-Tag: xen-15-06-02~366^2~8 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3342ec324a7a9e4cf451968a1b320e8098410cb6;p=people%2Fsstabellini%2Fqemu-dm.git%2F.git 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 Reviewed-by: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 45e0c8f6e9..fd1ad3abbe 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[] = {