bootdevice: add check in restore_boot_order()
qemu_boot_set() can't fail in restore_boot_order(), then simply assert it doesn't fail, by passing &error_abort if boot_set_handler set. Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
f05f47bb5f
commit
76349f5ba8
@ -105,7 +105,9 @@ void restore_boot_order(void *opaque)
|
||||
return;
|
||||
}
|
||||
|
||||
qemu_boot_set(normal_boot_order, NULL);
|
||||
if (boot_set_handler) {
|
||||
qemu_boot_set(normal_boot_order, &error_abort);
|
||||
}
|
||||
|
||||
qemu_unregister_reset(restore_boot_order, normal_boot_order);
|
||||
g_free(normal_boot_order);
|
||||
|
Loading…
Reference in New Issue
Block a user