]> git.proxmox.com Git - mirror_qemu.git/blobdiff - vl.c
vl: Fail right after first bad -object
[mirror_qemu.git] / vl.c
diff --git a/vl.c b/vl.c
index cdd81b448640a710fe5e4efc582a9db02ea6139c..c9c3f33ce76870205b822125e44565a8434d414c 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -468,6 +468,9 @@ static QemuOptsList qemu_icount_opts = {
         }, {
             .name = "align",
             .type = QEMU_OPT_BOOL,
+        }, {
+            .name = "sleep",
+            .type = QEMU_OPT_BOOL,
         },
         { /* end of list */ }
     },
@@ -2497,14 +2500,20 @@ static void qemu_run_exit_notifiers(void)
     notifier_list_notify(&exit_notifiers, NULL);
 }
 
+static bool machine_init_done;
+
 void qemu_add_machine_init_done_notifier(Notifier *notify)
 {
     notifier_list_add(&machine_init_done_notifiers, notify);
+    if (machine_init_done) {
+        notify->notify(notify, NULL);
+    }
 }
 
 static void qemu_run_machine_init_done_notifiers(void)
 {
     notifier_list_notify(&machine_init_done_notifiers, NULL);
+    machine_init_done = true;
 }
 
 static const QEMUOption *lookup_opt(int argc, char **argv,
@@ -3788,7 +3797,7 @@ int main(int argc, char **argv, char **envp)
         exit(1);
     }
 
-    if (qemu_opts_foreach(qemu_find_opts("sandbox"), parse_sandbox, NULL, 0)) {
+    if (qemu_opts_foreach(qemu_find_opts("sandbox"), parse_sandbox, NULL, 1)) {
         exit(1);
     }
 
@@ -4040,13 +4049,13 @@ int main(int argc, char **argv, char **envp)
         exit(1);
     }
 
-    if (qemu_opts_foreach(qemu_find_opts("device"), device_help_func, NULL, 0)
+    if (qemu_opts_foreach(qemu_find_opts("device"), device_help_func, NULL, 1)
         != 0) {
         exit(0);
     }
 
     if (qemu_opts_foreach(qemu_find_opts("object"),
-                          object_create, NULL, 0) != 0) {
+                          object_create, NULL, 1) != 0) {
         exit(1);
     }