]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Fix media eject with qemu-0.12.*
authorJiri Denemark <jdenemar@redhat.com>
Mon, 28 Mar 2011 19:34:08 +0000 (21:34 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 30 Mar 2011 18:43:55 +0000 (20:43 +0200)
In qemu-0.12.* "device '...' is locked" message was changed to "Device
..." so libvirt was no longer detecting this as an error.

bootstrap.conf
src/qemu/qemu_monitor_text.c

index 6070204886bf04787e8bba2548bf1c1bbbaccf2a..6e10828814b3df6ceaa327e438353526d1b3ee6d 100644 (file)
@@ -63,6 +63,7 @@ sigpipe
 snprintf
 socket
 stpcpy
+strcasestr
 strchrnul
 strndup
 strerror
index fc19f722110c34cac5c4e0b76ae5ca8783bd9bd9..e0e32929db95e1b3469aba9847d4f692e8877ffe 100644 (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;