Received: from eggs.gnu.org ([2001:4830:134:3::10]:41971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAtsH-000146-AA for qemu-devel@nongnu.org; Sat, 26 Jul 2014 00:46:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAtsC-0003dm-GX for qemu-devel@nongnu.org; Sat, 26 Jul 2014 00:46:25 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:45837) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAtsB-0003cZ-Rb for qemu-devel@nongnu.org; Sat, 26 Jul 2014 00:46:20 -0400 From: Date: Sat, 26 Jul 2014 12:45:30 +0800 Message-ID: <1406349933-17536-5-git-send-email-arei.gonglei@huawei.com> In-Reply-To: <1406349933-17536-1-git-send-email-arei.gonglei@huawei.com> References: <1406349933-17536-1-git-send-email-arei.gonglei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v3 4/7] bootindex: delete bootindex when device is removed 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, gaowanlong@cn.fujitsu.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 Device should be removed from global boot list when it is hot-unplugged. Signed-off-by: Chenliang Signed-off-by: Gonglei --- hw/core/qdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index da1ba48..7bc12bc 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -975,6 +975,8 @@ static void device_finalize(Object *obj) if (dev->opts) { qemu_opts_del(dev->opts); } + /* remove device's bootindex from global boot order list */ + del_boot_device_path(dev); QLIST_FOREACH_SAFE(ngl, &dev->gpios, node, next) { QLIST_REMOVE(ngl, node); -- 1.7.12.4