Re: [PATCH v2 5/9] bhyve: start using virDomainObjCheckActive

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

 



On Tue, Apr 17, 2018 at 10:13:30PM +0000, Clementine Hayat wrote:
Signed-off-by: Clementine Hayat <clem@xxxxxxxxxxxx>
---
src/bhyve/bhyve_driver.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 24c4a9c80..8aff0c65c 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -883,11 +883,8 @@ bhyveDomainCreateWithFlags(virDomainPtr dom,
    if (virDomainCreateWithFlagsEnsureACL(dom->conn, vm->def) < 0)
        goto cleanup;

-    if (virDomainObjIsActive(vm)) {
-        virReportError(VIR_ERR_OPERATION_INVALID,
-                       "%s", _("Domain is already running"));
+    if (virDomainObjCheckActive(vm) < 0)
        goto cleanup;
-    }

    ret = virBhyveProcessStart(dom->conn, privconn, vm,
                               VIR_DOMAIN_RUNNING_BOOTED,

This hunk is incorrect - it would reverse the logic.

Jano

Attachment: signature.asc
Description: Digital signature

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

  Powered by Linux