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>
This commit is contained in:
parent
bdbb5b1706
commit
e614b54b93
|
@ -82,6 +82,8 @@ void add_boot_device_path(int32_t bootindex, DeviceState *dev,
|
||||||
|
|
||||||
assert(dev != NULL || suffix != NULL);
|
assert(dev != NULL || suffix != NULL);
|
||||||
|
|
||||||
|
del_boot_device_path(dev, suffix);
|
||||||
|
|
||||||
node = g_malloc0(sizeof(FWBootEntry));
|
node = g_malloc0(sizeof(FWBootEntry));
|
||||||
node->bootindex = bootindex;
|
node->bootindex = bootindex;
|
||||||
node->suffix = g_strdup(suffix);
|
node->suffix = g_strdup(suffix);
|
||||||
|
|
Loading…
Reference in New Issue