diff options
author | Gonglei <arei.gonglei@huawei.com> | 2015-01-29 13:13:47 +0000 |
---|---|---|
committer | Lili <huanglili.huang@huawei.com> | 2015-03-03 13:13:21 +0800 |
commit | 76349f5ba8f4e2f0b8c93c12ec0950a8bc77408a (patch) | |
tree | b86939dc5f1703725638875a6a51e37568931683 | |
parent | f05f47bb5f07ca32a23edf1df3dd75f5004f9325 (diff) |
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>
-rw-r--r-- | bootdevice.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bootdevice.c b/bootdevice.c index c3a010c094..df9ab0e802 100644 --- a/bootdevice.c +++ b/bootdevice.c @@ -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); |