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:
Gonglei 2015-01-29 13:13:47 +00:00 committed by Lili
parent f05f47bb5f
commit 76349f5ba8

View File

@ -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);