]> git.proxmox.com Git - mirror_qemu.git/blobdiff - vl.c
Don't resume guest when gdb connection terminates and -S specified.
[mirror_qemu.git] / vl.c
diff --git a/vl.c b/vl.c
index 9f620cb1deed1a21fa9e31f20a38421b9169d7ee..f92c989d4891363e4a300858b24d1a599659b995 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -172,6 +172,7 @@ int daemonize = 0;
 const char *option_rom[MAX_OPTION_ROMS];
 int nb_option_roms;
 int semihosting_enabled = 0;
+int autostart = 1;
 
 /***********************************************************/
 /* x86 ISA bus support */
@@ -6530,7 +6531,6 @@ int main(int argc, char **argv)
     const char *kernel_filename, *kernel_cmdline;
     DisplayState *ds = &display_state;
     int cyls, heads, secs, translation;
-    int start_emulation = 1;
     char net_clients[MAX_NET_CLIENTS][256];
     int nb_net_clients;
     int optind;
@@ -6838,7 +6838,7 @@ int main(int argc, char **argv)
                 bios_dir = optarg;
                 break;
             case QEMU_OPTION_S:
-                start_emulation = 0;
+                autostart = 0;
                 break;
            case QEMU_OPTION_k:
                keyboard_layout = optarg;
@@ -7254,7 +7254,7 @@ int main(int argc, char **argv)
     {
         /* XXX: simplify init */
         read_passwords();
-        if (start_emulation) {
+        if (autostart) {
             vm_start();
         }
     }