From 21a83eadddfd1a074b29b9b08d9ca2023267b696 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Fri, 30 Apr 2010 15:21:11 -0600 Subject: [PATCH] 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 -- Signed-off-by: Anthony Liguori --- vl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vl.c b/vl.c index 5e03b72..53ea698 100644 --- a/vl.c +++ b/vl.c @@ -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); -- 2.7.4