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

[Xen-changelog] [xen master] libxl: Avoid returning empty path from libxl_console_get_tty



commit 260dfd39681b4e9b236e1e211b09dce8c5408e91
Author:     Anthony PERARD <anthony.perard@xxxxxxxxxx>
AuthorDate: Thu Jan 15 17:55:56 2015 +0000
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Mon Jan 19 17:21:31 2015 +0000

    libxl: Avoid returning empty path from libxl_console_get_tty
    
    This could happen if xenconsoled have not populate the xenstore key yet.
    
    Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/libxl/libxl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 11cf0e1..82227e8 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -1734,7 +1734,7 @@ int libxl_console_get_tty(libxl_ctx *ctx, uint32_t domid, 
int cons_num,
     }
 
     tty = libxl__xs_read(gc, XBT_NULL, tty_path);
-    if (!tty) {
+    if (!tty || tty[0] == '\0') {
        LOGE(ERROR,"unable to read console tty path `%s'",tty_path);
        rc = ERROR_FAIL;
        goto out;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.