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

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



# HG changeset patch
# User Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
# Date 1279121807 -3600
# Node ID c18f43ed379e3d1c56145b491107e32b94cafa50
# Parent  acd99661ba05e81e8734d2fb446d9645bacf4e07
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>
---
 tools/console/client/main.c |    2 ++
 1 files changed, 2 insertions(+)

diff -r acd99661ba05 -r c18f43ed379e tools/console/client/main.c
--- a/tools/console/client/main.c       Wed Jul 14 16:36:23 2010 +0100
+++ b/tools/console/client/main.c       Wed Jul 14 16:36:47 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®.