-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkvm-Fix-boot-once-option.patch
54 lines (45 loc) · 1.6 KB
/
kvm-Fix-boot-once-option.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 9dfe0bab607d6781b13254b31b5e6aad381c2f98 Mon Sep 17 00:00:00 2001
From: Alex Williamson <[email protected]>
Date: Wed, 5 May 2010 16:19:59 -0300
Subject: [PATCH 3/9] Fix boot once option
RH-Author: Alex Williamson <[email protected]>
Message-id: <1273076399.2616.36.camel@localhost>
Patchwork-id: 9051
O-Subject: [RHEL-6 qemu-kvm PATCH] Fix boot once option
Bugzilla: 579692
RH-Acked-by: Kevin Wolf <[email protected]>
RH-Acked-by: Jes Sorensen <[email protected]>
RH-Acked-by: Juan Quintela <[email protected]>
Bugzilla: 579692
Upstream commit: 37905d6ae53d8a9f0744867a8cf2dad6e7ae3674
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 <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
---
vl.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
Signed-off-by: Eduardo Habkost <[email protected]>
---
vl.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/vl.c b/vl.c
index a01308a..45f4514 100644
--- a/vl.c
+++ b/vl.c
@@ -2598,6 +2598,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);
--
1.7.0.3