From: Gonglei Date: Tue, 7 Oct 2014 08:00:09 +0000 (+0800) Subject: bootindex: rework add_boot_device_path function X-Git-Tag: qemu-xen-4.6.0-rc1~131^2~29 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e614b54b9340e6fe14eaecd378a2d7d7ebcde736;p=qemu-upstream-4.6-testing.git 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 --- diff --git a/bootdevice.c b/bootdevice.c index 7167fbcfe..aac0ffbce 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);