Skip to contentSkip to conversation

Xen33: Fix serial console for HVM guests

PATCH New Christoph Egger 1 participant 1 message Oct 26, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Xen33: Fix serial console for HVM guests

Hi!

Attached patch fixes serial console for HVM guests in Xen 3.3.

Manpage states: "The cfmakeraw function sets the flags stored in the termios structure (initialized by tcgetattr) to a state ... giving a 'raw I/O path'.

From: Manuel Bouyer <[email protected]>

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
tools/ioemu/vl.c +4 -1
diff -r f1fb228b43ac tools/ioemu/vl.c
@@ -1914,8 +1914,11 @@ static CharDriverState *qemu_chr_open_pt
     }
     
     /* Set raw attributes on the pty. */
+    if (tcgetattr(master_fd, &tty) < 0)
+        perror("tcgetattr failed");
     cfmakeraw(&tty);
-    tcsetattr(slave_fd, TCSAFLUSH, &tty);
+    if (tcsetattr(slave_fd, TCSAFLUSH, &tty) < 0)
+        perror("tcsetattr failed");
 
     fprintf(stderr, "char device redirected to %s\n", ptsname(master_fd));
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel