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

Scrap media eject output to try and determine success/fail.

上级 34b1a034
Wed Sep 3 10:42:00 EST 2008 Cole Robinson <crobinso@redhat.com>
* src/qemu_driver.c: scrape media eject output to determine failure
Wed Sep 3 09:58:00 EST 2008 Cole Robinson <crobinso@redhat.com>
* src/domain_conf.c: fix disk device ordering when parsing domain
......
......@@ -2972,6 +2972,19 @@ static int qemudDomainChangeCDROM(virDomainPtr dom,
VIR_FREE(cmd);
return -1;
}
/* If the command failed qemu prints:
* device not found, device is locked ...
* No message is printed on success it seems */
DEBUG ("cdrom change reply: %s", reply);
if (strstr(reply, "\ndevice ")) {
qemudReportError (dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED,
"%s", _("changing cdrom media failed"));
VIR_FREE(reply);
VIR_FREE(cmd);
return -1;
}
VIR_FREE(reply);
VIR_FREE(cmd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册