WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 1 of 4] xenconsoled: do not write the pty under seria

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1 of 4] xenconsoled: do not write the pty under serial
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Mon, 9 Aug 2010 15:01:17 +0100
Delivery-date: Mon, 09 Aug 2010 07:03:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
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@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>