From nobody Tue Nov 26 07:43:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=ixsystems.com ARC-Seal: i=1; a=rsa-sha256; t=1582353626; cv=none; d=zohomail.com; s=zohoarc; b=MHN7NTTfgVAmV2kl3rciyRzZs0avjEDh52PmWrHwCs8+2bEnHjcxWMatmPhM4WJbGdG01AB0BV80tpa8lN8EW8JvZF47t64/3atiM2+27uiT+IGYPxee3s4bLh0rBwKE3o5QK+jpBqa/gyVu/pjnPz6Zuy92at9QHCuIhOWv1QM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582353626; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2yks+ebGqF1ujrAbGvzEeByKkGybUXhHgSmOcTUbgxk=; b=Yg4GTwALAuzUdI4paV0KmpsPx8UXOAlLlw9ZdhRz4VPChQ3NWQ+2QfhlNnbh4MF/jdPamKgER2NSFztH74fCxRdPbjXGka86fkOvLbZYSG06yzA62OSioxhGyjSDOR5hbswbinlp6bPROcRpWvW8ATLrZXfT6Ne2maHXgEcSHPA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 15823536262461002.5817282981556; Fri, 21 Feb 2020 22:40:26 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-331-DD3F0pJaMPy8a7t7ArsXgA-1; Sat, 22 Feb 2020 01:40:22 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D14F3801E6C; Sat, 22 Feb 2020 06:40:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9DFCE8B754; Sat, 22 Feb 2020 06:40:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 449DD860D3; Sat, 22 Feb 2020 06:40:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01M6dWmp021691 for ; Sat, 22 Feb 2020 01:39:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5EB6D2063211; Sat, 22 Feb 2020 06:39:32 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 59A292063209 for ; Sat, 22 Feb 2020 06:39:32 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3F5E5101A55A for ; Sat, 22 Feb 2020 06:39:32 +0000 (UTC) Received: from mail-yw1-f66.google.com (mail-yw1-f66.google.com [209.85.161.66]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-410-_ZBub0fOOviy-P4SaAJDNw-1; Sat, 22 Feb 2020 01:39:30 -0500 Received: by mail-yw1-f66.google.com with SMTP id a125so2609710ywe.12 for ; Fri, 21 Feb 2020 22:39:29 -0800 (PST) Received: from xeon-freebsd.freqlabs.com. (69-228-200-148.lightspeed.knvltn.sbcglobal.net. [69.228.200.148]) by smtp.gmail.com with ESMTPSA id c84sm2482131ywa.1.2020.02.21.22.39.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 22:39:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582353625; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=2yks+ebGqF1ujrAbGvzEeByKkGybUXhHgSmOcTUbgxk=; b=bU4L3seR8ket13rBYCA70IBNG5v0gnFJ7OS66XcmVwONUSXELvxNKeoof/0TJ/3cn8sSZW EHr0xhBoqgQ8I9w9kDMHrDGrBZfaWs0KQWevmvQ0/ulVMITigjWQz7xVhpxART0oyf3KEv 7G3DTCxMdHp2tSVm5r3Cr4SphHDlo4Q= X-MC-Unique: DD3F0pJaMPy8a7t7ArsXgA-1 X-MC-Unique: _ZBub0fOOviy-P4SaAJDNw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=41sKpQBHV229YGc2PoPPq4+LwkVLPEWxwJHkGW5Xi+s=; b=E5e2DHoycqwYQH3fgm7Nn/RZ7Kt8Zg6RHOe6p0qhh6ya9/u65qMGS2p3wOk5IgJbJo GbnC7+Dxdme+7PU5TnY6fF2qeXTIuW03f5QSYzBFVCBg9+MZp2qkKOW8yTGCsStasDL7 GaTeJP2UXUR6QEuao8nldTHOtJ4KKVBPJEbdkpAfzBeeOtnST1d74bYsT5yAbyFIEbNA 8iFpFRnG4SHiCKZjJdGJRjENTJ+xL7BdgxKLwLcpR4V3Bjstt+WYoL/X0j65ERRCEisG ub/uo+VB+thvZHoQac6cXlClXTzRTG31gPi81Xu9UAqY0gf+it7g2O+PUFdazQk/w27r cJQA== X-Gm-Message-State: APjAAAX+NtaN/QRZSn32lALWnEI8H/kUDVGoN6vRU7FW2oEdMKNjAQ0s JcavwMJyretwb32H1bBXAAkRF7R3Z9J8Cts0wiCJBbE2p88xbOOz62uE5QmGKOvFO56YcsrnUAT mAb/JPnthr3XGl/yKN8M3z9xL1m38w1ikmk32AU/QM4mhXIOs2ssOmpqD0fR+MOAip84= X-Google-Smtp-Source: APXvYqxmfL6tjtMvWqnKRZstVd9j5ykQ2eQEHBTTRelw8s/VRJWnyllhEvT8ea+iaL6kf9HTi21Vpw== X-Received: by 2002:a25:3753:: with SMTP id e80mr1194781yba.213.1582353569383; Fri, 21 Feb 2020 22:39:29 -0800 (PST) From: Ryan Moeller X-Google-Original-From: Ryan Moeller To: libvir-list@redhat.com Subject: [PATCH 06/16] Factor out conn Date: Sat, 22 Feb 2020 01:38:45 -0500 Message-Id: <20200222063855.89637-7-ryan@iXsystems.com> In-Reply-To: <20200222063855.89637-1-ryan@iXsystems.com> References: <20200222063855.89637-1-ryan@iXsystems.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 01M6dWmp021691 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Ryan Moeller Reviewed-by: J=C3=A1n Tomko --- src/bhyve/bhyve_driver.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 7b8e4808f9..625dc0ec22 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -946,7 +946,8 @@ bhyveDomainCreateXML(virConnectPtr conn, static int bhyveDomainDestroyFlags(virDomainPtr dom, unsigned int flags) { - bhyveConnPtr privconn =3D dom->conn->privateData; + virConnectPtr conn =3D dom->conn; + bhyveConnPtr privconn =3D conn->privateData; virDomainObjPtr vm; virObjectEventPtr event =3D NULL; int ret =3D -1; @@ -956,7 +957,7 @@ bhyveDomainDestroyFlags(virDomainPtr dom, unsigned int = flags) if (!(vm =3D bhyveDomObjFromDomain(dom))) goto cleanup; =20 - if (virDomainDestroyFlagsEnsureACL(dom->conn, vm->def) < 0) + if (virDomainDestroyFlagsEnsureACL(conn, vm->def) < 0) goto cleanup; =20 if (virDomainObjCheckActive(vm) < 0) @@ -1060,7 +1061,8 @@ bhyveDomainSetMetadata(virDomainPtr dom, const char *uri, unsigned int flags) { - bhyveConnPtr privconn =3D dom->conn->privateData; + virConnectPtr conn =3D dom->conn; + bhyveConnPtr privconn =3D conn->privateData; virDomainObjPtr vm; int ret =3D -1; =20 @@ -1070,7 +1072,7 @@ bhyveDomainSetMetadata(virDomainPtr dom, if (!(vm =3D bhyveDomObjFromDomain(dom))) return -1; =20 - if (virDomainSetMetadataEnsureACL(dom->conn, vm->def, flags) < 0) + if (virDomainSetMetadataEnsureACL(conn, vm->def, flags) < 0) goto cleanup; =20 ret =3D virDomainObjSetMetadata(vm, type, metadata, key, uri, --=20 2.24.1