diff options
author | Alexander Graf <agraf@suse.de> | 2011-07-03 09:44:48 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2011-07-17 01:54:25 +0200 |
commit | 25a118130fde0d20b0f5a223642849b392b2f2ee (patch) | |
tree | 131655138e2d3cd5a1794c4f4cd400596304aea4 /hw/xen_console.c | |
parent | 0f51726adcdb620214405a88b2601d9edd059db4 (diff) |
xen_console: fall back to qemu serial device
The new xen_console protocol changed the default xen_console output device
from whatever Qemu chose to whatever xenstore choses and "pty" as fallback.
This is not how Qemu works. It has its own serial redirection semantics. So
it xenstore doesn't contain information on what to do, Qemu is the place to
ask.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/xen_console.c')
-rw-r--r-- | hw/xen_console.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/hw/xen_console.c b/hw/xen_console.c index bdb8540542..8ef104c9ac 100644 --- a/hw/xen_console.c +++ b/hw/xen_console.c @@ -196,12 +196,15 @@ static int con_init(struct XenDevice *xendev) } output = xenstore_read_str(con->console, "output"); - /* output is a pty by default */ + + /* no Xen override, use qemu output device */ if (output == NULL) { - output = "pty"; + con->chr = serial_hds[con->xendev.dev]; + } else { + snprintf(label, sizeof(label), "xencons%d", con->xendev.dev); + con->chr = qemu_chr_open(label, output, NULL); } - snprintf(label, sizeof(label), "xencons%d", con->xendev.dev); - con->chr = qemu_chr_open(label, output, NULL); + xenstore_store_pv_console_info(con->xendev.dev, con->chr); out: |