Send guest output on all xen-attached console devices
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 10 Jan 2006 15:00:37 +0000 (16:00 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 10 Jan 2006 15:00:37 +0000 (16:00 +0100)
(i.e., on vga console as well as serial console, if dom0
didn't take over the vga console).

Signed-off-by: Jan Beulich <JBeulich@novell.com>
xen/drivers/char/console.c

index 782ec814bf4d2996a54669c5fa3e0d464fb587d8..e36285b7ca72da145e75cb831b13d3d4f59f261a 100644 (file)
@@ -311,7 +311,7 @@ static void serial_rx(char c, struct cpu_user_regs *regs)
 
 long guest_console_write(char *buffer, int count)
 {
-    char kbuf[128];
+    char kbuf[128], *kptr;
     int kcount;
 
     while ( count > 0 )
@@ -334,6 +334,9 @@ long guest_console_write(char *buffer, int count)
 
         serial_puts(sercon_handle, kbuf);
 
+        for ( kptr = kbuf; *kptr != '\0'; kptr++ )
+            putchar_console(*kptr);
+
         buffer += kcount;
         count  -= kcount;
     }