26 lines
1001 B
Diff
26 lines
1001 B
Diff
|
Index: xen-4.0.0-testing/tools/ioemu-remote/hw/xen_console.c
|
||
|
===================================================================
|
||
|
--- xen-4.0.0-testing.orig/tools/ioemu-remote/hw/xen_console.c
|
||
|
+++ xen-4.0.0-testing/tools/ioemu-remote/hw/xen_console.c
|
||
|
@@ -182,6 +182,7 @@ static int con_init(struct XenDevice *xe
|
||
|
{
|
||
|
struct XenConsole *con = container_of(xendev, struct XenConsole, xendev);
|
||
|
char *type, *dom;
|
||
|
+ int retries = 0;
|
||
|
|
||
|
/* setup */
|
||
|
dom = xs_get_domain_path(xenstore, con->xendev.dom);
|
||
|
@@ -191,7 +192,11 @@ static int con_init(struct XenDevice *xe
|
||
|
snprintf(con->console, sizeof(con->console), "%s/device/console/%d", dom, xendev->dev);
|
||
|
free(dom);
|
||
|
|
||
|
- type = xenstore_read_str(con->console, "type");
|
||
|
+ while (!(type = xenstore_read_str(con->console, "type")) && retries < 5) {
|
||
|
+ usleep(250000);
|
||
|
+ retries++;
|
||
|
+ }
|
||
|
+
|
||
|
if (!type || 0 != strcmp(type, "ioemu")) {
|
||
|
xen_be_printf(xendev, 1, "not for me (type=%s)\n", type);
|
||
|
if (type)
|