qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v8 26/30] virtio-blk: add bootindex to qom property


From: arei.gonglei
Subject: [Qemu-devel] [PATCH v8 26/30] virtio-blk: add bootindex to qom property
Date: Wed, 10 Sep 2014 20:04:20 +0800

From: Gonglei <address@hidden>

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 <address@hidden>
---
 hw/block/virtio-blk.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index a7f2827..9d04590 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -805,6 +805,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->conf->bootindex,
+                                  "bootindex", "/address@hidden,0",
+                                  DEVICE(obj), NULL);
 }
 
 static Property virtio_blk_properties[] = {
-- 
1.7.12.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]