render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
Blob Blame History Raw
From 3969a0495e73417fb15af3b0271ab8986eb56389 Mon Sep 17 00:00:00 2001
Message-Id: <3969a0495e73417fb15af3b0271ab8986eb56389@dist-git>
From: John Ferlan <jferlan@redhat.com>
Date: Mon, 25 Jul 2016 12:43:02 -0400
Subject: [PATCH] qemu: Move setting of encobjAdded for
 qemuDomainAttachSCSIDisk

https://bugzilla.redhat.com/show_bug.cgi?id=1301021

A post push realization that the boolean should be set inside the condition

(cherry picked from commit 4f5debbeb4bf39049f212572a249da0483d6d3bb)
Signed-off-by: John Ferlan <jferlan@redhat.com>
---
 src/qemu/qemu_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 1fa1010..394fdf4 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -652,8 +652,8 @@ qemuDomainAttachSCSIDisk(virConnectPtr conn,
         encobjProps = NULL; /* qemuMonitorAddObject consumes */
         if (rv < 0)
             goto exit_monitor;
+        encobjAdded = true;
     }
-    encobjAdded = true;
 
     if (qemuMonitorAddDrive(priv->mon, drivestr) < 0)
         goto exit_monitor;
-- 
2.9.2