[PATCH] qemu: bugfix: don't fail if disk media removed on second attempt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
---
 src/qemu/qemu_hotplug.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index e0b8230..5bbfb5e 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -267,12 +267,12 @@ qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
                                     format);
         if (qemuDomainObjExitMonitor(driver, vm) < 0)
             goto cleanup;
+
+        if (rc < 0)
+            goto error;
     }
 
-    virDomainAuditDisk(vm, disk->src, newsrc, "update", rc >= 0);
-
-    if (rc < 0)
-        goto error;
+    virDomainAuditDisk(vm, disk->src, newsrc, "update", true);
 
     /* remove the old source from shared device list */
     ignore_value(qemuRemoveSharedDisk(driver, disk, vm->def->name));
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]