Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
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