qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix boot once option
@ 2010-04-30 21:21 Alex Williamson
  2010-05-03 17:15 ` Anthony Liguori
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Williamson @ 2010-04-30 21:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: jan.kiszka

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>
--

diff --git a/vl.c b/vl.c
index a485c58..2fabc7e 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);
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-03 17:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-30 21:21 [Qemu-devel] [PATCH] Fix boot once option Alex Williamson
2010-05-03 17:15 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).