[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Reorder alarm timer setup again
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH] Reorder alarm timer setup again |
Date: |
Thu, 01 Nov 2012 17:25:24 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
From: Jan Kiszka <address@hidden>
ac4119c023 moved the alarm timer initialization to an earlier point but
failed to consider that it depends on qemu_init_main_loop. Instead of
moving the wrong things before os_daemonize, better push alarm timer
right after qemu_init_main_loop and move the chardev initialization
after this.
Reported-by: Gabriel L. Somlo <address@hidden>
Signed-off-by: Jan Kiszka <address@hidden>
---
vl.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/vl.c b/vl.c
index 5513d15..e27839a 100644
--- a/vl.c
+++ b/vl.c
@@ -3551,15 +3551,8 @@ int main(int argc, char **argv, char **envp)
add_device_config(DEV_VIRTCON, "vc:80Cx24C");
}
- if (init_timer_alarm() < 0) {
- fprintf(stderr, "could not initialize alarm timer\n");
- exit(1);
- }
-
socket_init();
- if (qemu_opts_foreach(qemu_find_opts("chardev"), chardev_init_func, NULL,
1) != 0)
- exit(1);
#ifdef CONFIG_VIRTFS
if (qemu_opts_foreach(qemu_find_opts("fsdev"), fsdev_init_func, NULL, 1)
!= 0) {
exit(1);
@@ -3591,6 +3584,16 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
+ if (init_timer_alarm() < 0) {
+ fprintf(stderr, "could not initialize alarm timer\n");
+ exit(1);
+ }
+
+ if (qemu_opts_foreach(qemu_find_opts("chardev"), chardev_init_func,
+ NULL, 1) != 0) {
+ exit(1);
+ }
+
machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0);
if (machine_opts) {
kernel_filename = qemu_opt_get(machine_opts, "kernel");
--
1.7.3.4