Commit 51ecf1368d96123cda9b0023eb68a3801f6d70de
1 parent
970d878c
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
Showing
1 changed file
with
10 additions
and
0 deletions
vl.c
... | ... | @@ -4062,6 +4062,7 @@ enum { |
4062 | 4062 | QEMU_OPTION_echr, |
4063 | 4063 | QEMU_OPTION_monitor, |
4064 | 4064 | QEMU_OPTION_serial, |
4065 | + QEMU_OPTION_virtiocon, | |
4065 | 4066 | QEMU_OPTION_parallel, |
4066 | 4067 | QEMU_OPTION_loadvm, |
4067 | 4068 | QEMU_OPTION_full_screen, |
... | ... | @@ -4171,6 +4172,7 @@ static const QEMUOption qemu_options[] = { |
4171 | 4172 | { "echr", HAS_ARG, QEMU_OPTION_echr }, |
4172 | 4173 | { "monitor", HAS_ARG, QEMU_OPTION_monitor }, |
4173 | 4174 | { "serial", HAS_ARG, QEMU_OPTION_serial }, |
4175 | + { "virtioconsole", HAS_ARG, QEMU_OPTION_virtiocon }, | |
4174 | 4176 | { "parallel", HAS_ARG, QEMU_OPTION_parallel }, |
4175 | 4177 | { "loadvm", HAS_ARG, QEMU_OPTION_loadvm }, |
4176 | 4178 | { "full-screen", 0, QEMU_OPTION_full_screen }, |
... | ... | @@ -4969,6 +4971,14 @@ int main(int argc, char **argv, char **envp) |
4969 | 4971 | serial_devices[serial_device_index] = optarg; |
4970 | 4972 | serial_device_index++; |
4971 | 4973 | break; |
4974 | + case QEMU_OPTION_virtiocon: | |
4975 | + if (virtio_console_index >= MAX_VIRTIO_CONSOLES) { | |
4976 | + fprintf(stderr, "qemu: too many virtio consoles\n"); | |
4977 | + exit(1); | |
4978 | + } | |
4979 | + virtio_consoles[virtio_console_index] = optarg; | |
4980 | + virtio_console_index++; | |
4981 | + break; | |
4972 | 4982 | case QEMU_OPTION_parallel: |
4973 | 4983 | if (parallel_device_index >= MAX_PARALLEL_PORTS) { |
4974 | 4984 | fprintf(stderr, "qemu: too many parallel ports\n"); | ... | ... |