Fix boot once option

The boot once options seems to have gotten broken since it originally
went in.  We need to wait until the second time restore_boot_devices()
gets called before restoring the standard boot order and removing itself
from the reset list.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
--
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Alex Williamson 2010-04-30 15:21:11 -06:00 committed by Anthony Liguori
parent 70a4568fe0
commit 37905d6ae5
1 changed files with 7 additions and 0 deletions

7
vl.c
View File

@ -1193,6 +1193,13 @@ static void validate_bootdevices(char *devices)
static void restore_boot_devices(void *opaque)
{
char *standard_boot_devices = opaque;
static int first = 1;
/* Restore boot order and remove ourselves after the first boot */
if (first) {
first = 0;
return;
}
qemu_boot_set(standard_boot_devices);