[PATCH] qemu: Reverse condition in qemuDomainCheckDiskPresence

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

 



With current code, we pass true iff domain is cold booting. However,
if disk is inaccessible and startupPolicy for that disk is set to
'requisite' we have to fail iff cold booting.
---
 src/qemu/qemu_domain.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index f8b7c96..625c595 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1703,7 +1703,7 @@ qemuDomainSetFakeReboot(struct qemud_driver *driver,
 int
 qemuDomainCheckDiskPresence(struct qemud_driver *driver,
                             virDomainObjPtr vm,
-                            bool start_with_state)
+                            bool cold_boot)
 {
     int ret = -1;
     int i;
@@ -1738,7 +1738,7 @@ qemuDomainCheckDiskPresence(struct qemud_driver *driver,
                 break;
 
             case VIR_DOMAIN_STARTUP_POLICY_REQUISITE:
-                if (!start_with_state) {
+                if (cold_boot) {
                     virReportSystemError(errno,
                                          _("cannot access file '%s'"),
                                          disk->src);
-- 
1.7.8.5

--
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]