libxl: wait for console path before firing console_available
authorPaweł Marczewski <pawel@invisiblethingslab.com>
Tue, 3 Mar 2020 13:28:20 +0000 (14:28 +0100)
committerWei Liu <wl@xen.org>
Wed, 4 Mar 2020 10:15:45 +0000 (10:15 +0000)
commit0d99c909d7e1cbe69329a00f7772946f10a7865b
tree00cb599ca86e19b60df75dbc7cf0279dd300bf51
parent3e295eee884f57cd2e257ba70322d81fe39975de
libxl: wait for console path before firing console_available

If the path doesn't become available after LIBXL_INIT_TIMEOUT
seconds, fail the domain creation.

If we skip the bootloader, the TTY path will be set by xenconsoled.
However, there is no guarantee that this will happen by the time we
want to call the console_available callback, so we have to wait.

Signed-off-by: Paweł Marczewski <pawel@invisiblethingslab.com>
Reviewed-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
tools/libxl/libxl_console.c
tools/libxl/libxl_create.c
tools/libxl/libxl_internal.h