qemu: Fix media eject with qemu-0.12.*

In qemu-0.12.* "device '...' is locked" message was changed to "Device
..." so libvirt was no longer detecting this as an error.
This commit is contained in:
Jiri Denemark 2011-03-28 21:34:08 +02:00
parent 6c8f24751e
commit e586f57487
2 changed files with 2 additions and 1 deletions

View File

@ -63,6 +63,7 @@ sigpipe
snprintf
socket
stpcpy
strcasestr
strchrnul
strndup
strerror

View File

@ -934,7 +934,7 @@ int qemuMonitorTextEjectMedia(qemuMonitorPtr mon,
/* If the command failed qemu prints:
* device not found, device is locked ...
* No message is printed on success it seems */
if (strstr(reply, "device ")) {
if (strcasestr(reply, "device ")) {
qemuReportError(VIR_ERR_OPERATION_FAILED,
_("could not eject media on %s: %s"), devname, reply);
goto cleanup;