[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.0-testing] xenconsole: do not exit if a pty device is missing



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1280744130 -3600
# Node ID 73a9e51a1f2657f6a53bdc6451bc086dae6eedf5
# Parent  b4a45cd33f80cf64ecaebebf13c0a9f5152f1153
xenconsole: do not exit if a pty device is missing

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>
xen-unstable changeset:   21797:c18f43ed379e
xen-unstable date:        Wed Jul 14 16:36:47 2010 +0100
---
 tools/console/client/main.c |    2 ++
 1 files changed, 2 insertions(+)

diff -r b4a45cd33f80 -r 73a9e51a1f26 tools/console/client/main.c
--- a/tools/console/client/main.c       Mon Aug 02 11:11:53 2010 +0100
+++ b/tools/console/client/main.c       Mon Aug 02 11:15:30 2010 +0100
@@ -115,6 +115,8 @@ static int get_pty_fd(struct xs_handle *
                         * 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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.