aboutsummaryrefslogtreecommitdiff
path: root/bootdevice.c
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2014-10-07 16:00:09 +0800
committerGerd Hoffmann <kraxel@redhat.com>2014-10-15 09:52:47 +0200
commite614b54b9340e6fe14eaecd378a2d7d7ebcde736 (patch)
tree27856050635f7c6c6bc7dc7057862c56ba694d7a /bootdevice.c
parentbdbb5b1706d165e8d4222121f1e9b59b6b4359ce (diff)
downloadqemu-arm-e614b54b9340e6fe14eaecd378a2d7d7ebcde736.tar.gz
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 <arei.gonglei@huawei.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'bootdevice.c')
-rw-r--r--bootdevice.c2
1 files changed, 2 insertions, 0 deletions
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);