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

Ján Tomko jtomko at redhat.com
Wed Apr 18 07:49:33 UTC 2018


On Tue, Apr 17, 2018 at 10:13:30PM +0000, Clementine Hayat wrote:
>Signed-off-by: Clementine Hayat <clem at lse.epita.fr>
>---
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180418/dc69442a/attachment-0001.sig>


More information about the libvir-list mailing list