From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeKXq-0006Zi-2P for qemu-devel@nongnu.org; Wed, 15 Oct 2014 05:07:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeKXg-00073t-VT for qemu-devel@nongnu.org; Wed, 15 Oct 2014 05:06:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeKXg-00073N-NY for qemu-devel@nongnu.org; Wed, 15 Oct 2014 05:06:48 -0400 From: Gerd Hoffmann Date: Wed, 15 Oct 2014 11:05:38 +0200 Message-Id: <1413363967-2489-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1413363967-2489-1-git-send-email-kraxel@redhat.com> References: <1413363967-2489-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 05/34] bootindex: rework add_boot_device_path function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gonglei , Gerd Hoffmann From: Gonglei Add the function of updating bootindex about fw_boot_order list in add_boot_device_path(). We should delete the old one if a device has existed in global fw_boot_order list. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- bootdevice.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootdevice.c b/bootdevice.c index 7167fbc..aac0ffb 100644 --- a/bootdevice.c +++ b/bootdevice.c @@ -82,6 +82,8 @@ void add_boot_device_path(int32_t bootindex, DeviceState *dev, assert(dev != NULL || suffix != NULL); + del_boot_device_path(dev, suffix); + node = g_malloc0(sizeof(FWBootEntry)); node->bootindex = bootindex; node->suffix = g_strdup(suffix); -- 1.8.3.1