Skip to content

Commit

Permalink
bootdevice: add check in restore_boot_order()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
gongleiarei authored and h00277896 committed Mar 3, 2015
1 parent f05f47b commit 76349f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bootdevice.c
Expand Up @@ -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);
Expand Down

0 comments on commit 76349f5

Please sign in to comment.