mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
Scrap media eject output to try and determine success/fail.
This commit is contained in:
parent
34b1a03402
commit
f4af06d812
@ -1,3 +1,7 @@
|
||||
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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user