From: Christoph Egger Subject: [PATCH] Xen33: Fix serial console for HVM guests Date: Mon, 26 Oct 2009 14:42:21 +0200 Message-ID: <200910261342.21623.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_tkZ5K0CGPkdTDZS" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_tkZ5K0CGPkdTDZS Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 Signed-off-by: Christoph Egger -- ---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 --Boundary-00=_tkZ5K0CGPkdTDZS Content-Type: text/x-diff; charset="iso 8859-15"; name="xen33_ioemu_sercons.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen33_ioemu_sercons.diff" diff -r f1fb228b43ac tools/ioemu/vl.c --- a/tools/ioemu/vl.c Mon Aug 31 09:45:27 2009 +0100 +++ b/tools/ioemu/vl.c Mon Oct 26 13:00:11 2009 +0100 @@ -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)); --Boundary-00=_tkZ5K0CGPkdTDZS Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_tkZ5K0CGPkdTDZS--