From: Christoph Egger Subject: [PATCH] xenconsoled: make guest console visible Date: Thu, 19 Feb 2009 16:58:38 +0100 Message-ID: <200902191658.38996.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_uGYnJZzMk/ea453" 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=_uGYnJZzMk/ea453 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch makes guest console output visible with NetBSD Dom0. After openpty(), slave_fd must be closed or guest console output goes to the slave while select() in xen console client listens on the master. Keir: Please apply the patch to -unstable and 3.3-testing tree. 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: Jochen Polster, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_uGYnJZzMk/ea453 Content-Type: text/x-diff; charset="us-ascii"; name="xenconsole_io.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xenconsole_io.diff" diff -r 7fe15a0ee3d8 tools/console/daemon/io.c --- a/tools/console/daemon/io.c Tue Feb 17 11:20:18 2009 +0000 +++ b/tools/console/daemon/io.c Mon Feb 19 16:42:40 2009 +0100 @@ -420,6 +420,14 @@ static int domain_create_tty(struct doma goto out; } + /* Close the slave fd or the guest console output disappears, + * otherwise. + */ + if (dom->slave_fd != -1) { + close(dom->slave_fd); + dom->slave_fd = -1; + } + if (dom->use_consolepath) { success = asprintf(&path, "%s/limit", dom->conspath) != -1; --Boundary-00=_uGYnJZzMk/ea453 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=_uGYnJZzMk/ea453--