Skip to contentSkip to conversation

xenconsoled: make guest console visible

PATCH New Christoph Egger 1 participant 1 message Feb 19, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xenconsoled: make guest console visible

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.

Signature · 6 lines
---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
tools/console/daemon/io.c +8 -0
diff -r 7fe15a0ee3d8 tools/console/daemon/io.c
@@ -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;

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