Stefano Stabellini
2010-Aug-09 14:01 UTC
[Xen-devel] [PATCH 1 of 4] xenconsoled: do not write the pty under serial
xenconsoled: do not write the pty under serial in xenstore if
xenconsoled is handling a consolepath.
The idea is that pv consoles use the "console" prefix in xenstore and
emulated serials use the "serial" prefix in xenstore.
There is no need to write the pty for a pv console under "serial",
considering that xenconsoled is already writing the pty under
"console"
too.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
diff -r 6b28b2dac7dd tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Thu Aug 05 11:36:24 2010 +0100
+++ b/tools/console/daemon/io.c Mon Aug 09 14:26:22 2010 +0100
@@ -451,27 +451,6 @@ static int domain_create_tty(struct doma
free(data);
}
free(path);
- }
-
- success = asprintf(&path, "%s/limit", dom->serialpath) != -1;
- if (!success)
- goto out;
- data = xs_read(xs, XBT_NULL, path, &len);
- if (data) {
- dom->buffer.max_capacity = strtoul(data, 0, 0);
- free(data);
- }
- free(path);
-
- success = asprintf(&path, "%s/tty", dom->serialpath) != -1;
- if (!success)
- goto out;
- success = xs_write(xs, XBT_NULL, path, slave, strlen(slave));
- free(path);
- if (!success)
- goto out;
-
- if (dom->use_consolepath) {
success = (asprintf(&path, "%s/tty", dom->conspath) != -1);
if (!success)
goto out;
@@ -479,6 +458,23 @@ static int domain_create_tty(struct doma
free(path);
if (!success)
goto out;
+ } else {
+ success = asprintf(&path, "%s/limit", dom->serialpath) !=
-1;
+ if (!success)
+ goto out;
+ data = xs_read(xs, XBT_NULL, path, &len);
+ if (data) {
+ dom->buffer.max_capacity = strtoul(data, 0, 0);
+ free(data);
+ }
+ free(path);
+ success = asprintf(&path, "%s/tty", dom->serialpath) != -1;
+ if (!success)
+ goto out;
+ success = xs_write(xs, XBT_NULL, path, slave, strlen(slave));
+ free(path);
+ if (!success)
+ goto out;
}
if (fcntl(dom->master_fd, F_SETFL, O_NONBLOCK) == -1)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Ian Jackson
2010-Aug-13 15:23 UTC
Re: [Xen-devel] [PATCH 1 of 4] xenconsoled: do not write the pty under serial
Stefano Stabellini writes ("[Xen-devel] [PATCH 1 of 4] xenconsoled: do not
write the pty under serial"):> xenconsoled: do not write the pty under serial in xenstore if
> xenconsoled is handling a consolepath.
>
> The idea is that pv consoles use the "console" prefix in xenstore
and
> emulated serials use the "serial" prefix in xenstore.
> There is no need to write the pty for a pv console under
"serial",
> considering that xenconsoled is already writing the pty under
"console"
> too.
>From your earlier document I don''t understand why xenconsoled ever
needs to write anything under "serial". According to the document
only HVM guests have emulated serial ports and they are only ever
handled by qemu.
Umm, it occurs to me that your document doesn''t seem to cover the
stubdom case.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Reasonably Related Threads
- Re: [Xen-changelog] New console transport and update xenconsoled.
- PATCH [xenconsoled]: makes pty slave raw early
- [PATCH, v2]: xl: Implement per-API-call garbage-collection lifetime
- [PATCH] xenconsoled: ignore spurious watch event
- [PATCH] Xenconsoled should ignore spurious watch event. Otherwise, it can rebind to the same evtchn of a dying domU during suspending and cause below error message: