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:
Anthony PERARD authored and Ian Campbell committed 2015-01-19 17:21:31 +00:00
1 parent 0e560dfc48
commit 260dfd3968
1 file changed
+1 -1
+1 -1
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.