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 2 of 9] xenconsole: do not exit if a pty device is mi

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 2 of 9] xenconsole: do not exit if a pty device is missing
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Mon, 12 Jul 2010 15:01:38 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Mon, 12 Jul 2010 07:02:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1278943296@xxxxxxxxxxxxxxxxxxxxx>
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
this can just mean we have raced with the bootloader exiting and if we
continue we will likely see the real domain console show up.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 988cf8dff1c0 -r 24a1b866b2d1 tools/console/client/main.c
--- a/tools/console/client/main.c       Mon Jul 12 14:56:37 2010 +0100
+++ b/tools/console/client/main.c       Mon Jul 12 14:56:37 2010 +0100
@@ -115,6 +115,8 @@
                         * disambiguate: just read the pty path */
                        pty_path = xs_read(xs, XBT_NULL, path, &len);
                        if (pty_path != NULL) {
+                               if (access(pty_path, R_OK|W_OK) != 0)
+                                       continue;
                                pty_fd = open(pty_path, O_RDWR | O_NOCTTY);
                                if (pty_fd == -1) 
                                        err(errno, "Could not open tty `%s'", 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel