Received: from eggs.gnu.org ([2001:4830:134:3::10]:43325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPp2p-0005ON-9i for qemu-devel@nongnu.org; Fri, 05 Sep 2014 04:39:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPp2k-0003NE-AM for qemu-devel@nongnu.org; Fri, 05 Sep 2014 04:38:59 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:34954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPp2j-0003MT-JJ for qemu-devel@nongnu.org; Fri, 05 Sep 2014 04:38:54 -0400 From: Date: Fri, 5 Sep 2014 16:37:33 +0800 Message-ID: <1409906256-11368-26-git-send-email-arei.gonglei@huawei.com> In-Reply-To: <1409906256-11368-1-git-send-email-arei.gonglei@huawei.com> References: <1409906256-11368-1-git-send-email-arei.gonglei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v7 25/28] virtio-blk: add bootindex to qom property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: chenliang88@huawei.com, weidong.huang@huawei.com, mst@redhat.com, aik@ozlabs.ru, hutao@cn.fujitsu.com, armbru@redhat.com, kraxel@redhat.com, akong@redhat.com, agraf@suse.de, Gonglei , aliguori@amazon.com, ehabkost@redhat.com, luonengjun@huawei.com, peter.huangpeng@huawei.com, hani@linux.com, stefanha@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com, kwolf@redhat.com, peter.crosthwaite@xilinx.com, imammedo@redhat.com, afaerber@suse.de From: Gonglei 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 --- 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", "/disk@0,0", + DEVICE(obj), NULL); } static Property virtio_blk_properties[] = { -- 1.7.12.4