aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index 5e03b72f74..53ea69888d 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);