mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
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@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
0e560dfc48
commit
260dfd3968
1 file changed
+1
-1
+1
-1
@@ -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;
|
||||
|
||||