aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-15 20:06:40 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-15 20:06:40 +0000
commit51ecf1368d96123cda9b0023eb68a3801f6d70de (patch)
tree75ed7a86a0f73c3f1b831c67135901aff6d1bf93 /vl.c
parent970d878c5432d8be41ac1eb4185ed4665fa6ab88 (diff)
add virtio-console cmdline option (Christian Ehrhardt)
This patch adds the typical qemu console command line switch to the virtio console. using -virtioconsole ARG it can now be specified what output a guest hvc should be redirected to. Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6317 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index 2379986877..2e1ce5e956 100644
--- a/vl.c
+++ b/vl.c
@@ -4062,6 +4062,7 @@ enum {
QEMU_OPTION_echr,
QEMU_OPTION_monitor,
QEMU_OPTION_serial,
+ QEMU_OPTION_virtiocon,
QEMU_OPTION_parallel,
QEMU_OPTION_loadvm,
QEMU_OPTION_full_screen,
@@ -4171,6 +4172,7 @@ static const QEMUOption qemu_options[] = {
{ "echr", HAS_ARG, QEMU_OPTION_echr },
{ "monitor", HAS_ARG, QEMU_OPTION_monitor },
{ "serial", HAS_ARG, QEMU_OPTION_serial },
+ { "virtioconsole", HAS_ARG, QEMU_OPTION_virtiocon },
{ "parallel", HAS_ARG, QEMU_OPTION_parallel },
{ "loadvm", HAS_ARG, QEMU_OPTION_loadvm },
{ "full-screen", 0, QEMU_OPTION_full_screen },
@@ -4969,6 +4971,14 @@ int main(int argc, char **argv, char **envp)
serial_devices[serial_device_index] = optarg;
serial_device_index++;
break;
+ case QEMU_OPTION_virtiocon:
+ if (virtio_console_index >= MAX_VIRTIO_CONSOLES) {
+ fprintf(stderr, "qemu: too many virtio consoles\n");
+ exit(1);
+ }
+ virtio_consoles[virtio_console_index] = optarg;
+ virtio_console_index++;
+ break;
case QEMU_OPTION_parallel:
if (parallel_device_index >= MAX_PARALLEL_PORTS) {
fprintf(stderr, "qemu: too many parallel ports\n");