提交 b9b9c8b0 编写于 作者: C Cole Robinson

Increase timeout for initial monitor poll, to prevent a guest from failing to...

Increase timeout for initial monitor poll, to prevent a guest from failing to start if it has to wait for a physical cdrom to spin up.
上级 4fc29fa9
Thu Dec 4 09:42:00 EST 2008 Cole Robinson <crobinso@redhat.com>
* src/qemu_driver.c: Increase timeout for initial monitor poll
Thu Dec 4 15:36:42 CET 2008 Daniel Veillard <veillard@redhat.com>
* src/bridge.c: patch setting MTU on tap interface to be the same
......
......@@ -360,9 +360,9 @@ qemudReadMonitorOutput(virConnectPtr conn,
char *buf,
int buflen,
qemudHandlerMonitorOutput func,
const char *what)
const char *what,
int timeout)
{
#define MONITOR_TIMEOUT 3000
int got = 0;
buf[0] = '\0';
......@@ -388,7 +388,7 @@ qemudReadMonitorOutput(virConnectPtr conn,
return -1;
}
ret = poll(&pfd, 1, MONITOR_TIMEOUT);
ret = poll(&pfd, 1, timeout);
if (ret == 0) {
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
_("Timed out while reading %s startup output"), what);
......@@ -422,7 +422,6 @@ qemudReadMonitorOutput(virConnectPtr conn,
_("Out of space while reading %s startup output"), what);
return -1;
#undef MONITOR_TIMEOUT
}
static int
......@@ -468,7 +467,7 @@ static int qemudOpenMonitor(virConnectPtr conn,
driver, vm, monfd,
buf, sizeof(buf),
qemudCheckMonitorPrompt,
"monitor");
"monitor", 10000);
/* Keep monitor open upon success */
if (ret == 0)
......@@ -579,7 +578,7 @@ static int qemudWaitForMonitor(virConnectPtr conn,
driver, vm, vm->stderr_fd,
buf, sizeof(buf),
qemudFindCharDevicePTYs,
"console");
"console", 3000);
buf[sizeof(buf)-1] = '\0';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册