From e614b54b9340e6fe14eaecd378a2d7d7ebcde736 Mon Sep 17 00:00:00 2001 From: Gonglei Date: Tue, 7 Oct 2014 16:00:09 +0800 Subject: [PATCH] bootindex: rework add_boot_device_path function 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 7167fbcfe6..aac0ffbcef 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); -- 2.11.4.GIT