+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
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);