aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index 746742e703..03cd386906 100644
--- a/vl.c
+++ b/vl.c
@@ -8381,9 +8381,6 @@ int main(int argc, char **argv)
}
break;
case QEMU_OPTION_nographic:
- serial_devices[0] = "stdio";
- parallel_devices[0] = "null";
- monitor_device = "stdio";
nographic = 1;
break;
#ifdef CONFIG_CURSES
@@ -8781,6 +8778,15 @@ int main(int argc, char **argv)
}
}
+ if (nographic) {
+ if (serial_device_index == 0)
+ serial_devices[0] = "stdio";
+ if (parallel_device_index == 0)
+ parallel_devices[0] = "null";
+ if (strncmp(monitor_device, "vc", 2) == 0)
+ monitor_device = "stdio";
+ }
+
#ifndef _WIN32
if (daemonize) {
pid_t pid;