xen/qemu-retry-be-status.patch

41 lines
1.5 KiB
Diff
Raw Normal View History

Index: xen-3.4.1-testing/tools/ioemu-remote/hw/xen_backend.c
===================================================================
--- xen-3.4.1-testing.orig/tools/ioemu-remote/hw/xen_backend.c
+++ xen-3.4.1-testing/tools/ioemu-remote/hw/xen_backend.c
@@ -377,8 +377,12 @@ static int xen_be_try_init(struct XenDev
int rc = 0;
if (!xendev->online) {
- xen_be_printf(xendev, 1, "not online\n");
- return -1;
+ sleep(3);
+ xenstore_read_be_int(xendev, "online", &xendev->online);
+ if (!xendev->online) {
+ xen_be_printf(xendev, 1, "not online\n");
+ return -1;
+ }
}
if (xendev->ops->init)
Index: xen-3.4.1-testing/tools/ioemu-remote/hw/xen_console.c
===================================================================
--- xen-3.4.1-testing.orig/tools/ioemu-remote/hw/xen_console.c
+++ xen-3.4.1-testing/tools/ioemu-remote/hw/xen_console.c
@@ -196,9 +196,14 @@ static int con_init(struct XenDevice *xe
type = xenstore_read_str(con->console, "type");
if (!type || 0 != strcmp(type, "ioemu")) {
- xen_be_printf(xendev, 1, "not for me (type=%s)\n", type);
- return -1;
+ sleep(3);
+ type = xenstore_read_str(con->console, "type");
+ if (!type || 0 != strcmp(type, "ioemu")) {
+ xen_be_printf(xendev, 1, "not for me (type=%s)\n", type);
+ return -1;
+ }
}
+ qemu_free(type);
if (!serial_hds[con->xendev.dev])
xen_be_printf(xendev, 1, "WARNING: serial line %d not configured\n",