From: Jiri Denemark Date: Mon, 28 Mar 2011 19:34:08 +0000 (+0200) Subject: qemu: Fix media eject with qemu-0.12.* X-Git-Tag: v0.9.0~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e586f57487f4a9f15837cd7d07e55c18187fbe9d;p=thirdparty%2Flibvirt.git 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. --- diff --git a/bootstrap.conf b/bootstrap.conf index 6070204886..6e10828814 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -63,6 +63,7 @@ sigpipe snprintf socket stpcpy +strcasestr strchrnul strndup strerror diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c index fc19f72211..e0e32929db 100644 --- a/src/qemu/qemu_monitor_text.c +++ b/src/qemu/qemu_monitor_text.c @@ -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;