From nobody Tue Nov 26 07:36:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1582353579; cv=none; d=zohomail.com; s=zohoarc; b=WLnPgqLEeuelJgw5S+QGZkCuG+nD8OwyDc8SOn6Ch0Z+PcCDxaZWu9qO/aswKKo9y9gw3zSQ4tXn6ZqFSBwRyzwZfeQIp7u+b5Gv8ep/nUod2yTW+cdY9RjBZkaHT0NL+s36HiXV8ggFEZQNUC7nPwVNYfau69eN+qgj2HQR6bo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582353579; 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=AhmVLnmRZE4FOZMaAqZDXuebmHfimQD2moBANZuynuk=; b=Ad1wEmzDnecmPoNr/CsD3vxsKsjEKXbnOT69NinDFnYT/iJKGOwmQENyLy1XLbZJiJd3KuxOFW1MvDPtlx+86c4s4NAcWWTrYW+79Mc73GW1hCWKSzW/MJXvGK/XvxHkKaYTnWvkd17kcbCXe8hsejdt3nOv5V5zeZNKZOWD0sE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1582353579097934.1703744389328; Fri, 21 Feb 2020 22:39:39 -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-419-kH3DK90rMm6nZi45qekwCA-1; Sat, 22 Feb 2020 01:39:35 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0D36C13E6; Sat, 22 Feb 2020 06:39:30 +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 DAF1690786; Sat, 22 Feb 2020 06:39:29 +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 968DC860D1; Sat, 22 Feb 2020 06:39:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01M6dKVr021637 for ; Sat, 22 Feb 2020 01:39:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id C255D1032530; Sat, 22 Feb 2020 06:39:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BCF551032523 for ; Sat, 22 Feb 2020 06:39:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (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 9F0E9185A78E for ; Sat, 22 Feb 2020 06:39:20 +0000 (UTC) Received: from mail-yw1-f65.google.com (mail-yw1-f65.google.com [209.85.161.65]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-116-s9oCqqiqOseoVsMOWppzXw-1; Sat, 22 Feb 2020 01:39:18 -0500 Received: by mail-yw1-f65.google.com with SMTP id n184so2640885ywc.3 for ; Fri, 21 Feb 2020 22:39:17 -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.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 22:39:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582353578; 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=AhmVLnmRZE4FOZMaAqZDXuebmHfimQD2moBANZuynuk=; b=gVamYZ2ANaH9oaHu3LagpPGpQfZ67JIQ522jidtrXVabPHxKG0GJFSm0iiDp2qBoXRXWlR /msES81wpWH98cZbopiMiXFI2vlOfARrs5lXdQZ69vG+zM2TP7HRyqpyiBzeLYLFksAB25 0wriU+iYmEZdQawCv1smTYcnpwx218I= X-MC-Unique: kH3DK90rMm6nZi45qekwCA-1 X-MC-Unique: s9oCqqiqOseoVsMOWppzXw-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=+ddWKnqhqTqiGr0ekondg9Tj3XvE7EST/xRFrg/NMzc=; b=AlTqx1T1E8M4Qr2mSSFMlY3vbbqP2o4HTBAQiPu9cM2IfFKtEVFOEaFKe0xUWio05v 7wKjkrCsbID2WdkD3nh6Y9KMcCy+TTS2d2ui+t/DM69bY262u6fA+QLn/6YyzbaSpHMp 0EzLi07Tl6NX67mm5CR91Ty/u+6S4ROgTUGtmjqEcFpM9R2voSMJC2ib67+FlHRLo33V zbtjIMvUZnW23MNfpEtIY1EuUOsujS8DXNrgYzP2CIR5FiFJzCzsrQNlhLIgvzvbnwVw M6v/oxNe4gOKTz29cJ4pRaw7vFUs1pHGpxzVzZUl4V8qzivrdds4gtjvGWto8Z1fK2JS RdAQ== X-Gm-Message-State: APjAAAVftJ0SpdaWgBumIhPe4CiXjjiUbibejLBGOALNQgQmFr2+W+XB KOnl+b1y46K0PfmKN3suimXFPaugBXox8acEYiUWywzj2+Rv1h2gzdVxwy2HhoXVFkXaL5t1fKv UEMgSY+0kVbYnA/aZ+8crTb7w7bb0NM8vfIFcCzJxBfc1nYV6GjiuuVFHyV7/sfIxPBc= X-Google-Smtp-Source: APXvYqx2Hc6RZEHOx/niJZlpb8RYt33rPIRb2bEaHqc84vg5kXBuBtE8qq9r6ocCbulJdeic/s0PeQ== X-Received: by 2002:a25:dcc2:: with SMTP id y185mr36857849ybe.130.1582353557100; Fri, 21 Feb 2020 22:39:17 -0800 (PST) From: Ryan Moeller X-Google-Original-From: Ryan Moeller To: libvir-list@redhat.com Subject: [PATCH 02/16] Simplify bhyve driver caps helpers Date: Sat, 22 Feb 2020 01:38:41 -0500 Message-Id: <20200222063855.89637-3-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.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 01M6dKVr021637 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.13 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_command.c | 40 +++++++++++++++++++-------------------- src/bhyve/bhyve_command.h | 4 ++-- src/bhyve/bhyve_driver.c | 21 +++++++++----------- src/bhyve/bhyve_driver.h | 4 ++-- src/bhyve/bhyve_process.c | 8 +++----- tests/bhyvexml2argvtest.c | 4 ++-- 6 files changed, 37 insertions(+), 44 deletions(-) diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 2df7b60115..a1078d1460 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -44,7 +44,7 @@ VIR_LOG_INIT("bhyve.bhyve_command"); =20 static int -bhyveBuildNetArgStr(virConnectPtr conn, +bhyveBuildNetArgStr(bhyveConnPtr driver, const virDomainDef *def, virDomainNetDefPtr net, virCommandPtr cmd, @@ -60,7 +60,7 @@ bhyveBuildNetArgStr(virConnectPtr conn, if (net->model =3D=3D VIR_DOMAIN_NET_MODEL_VIRTIO) { nic_model =3D g_strdup("virtio-net"); } else if (net->model =3D=3D VIR_DOMAIN_NET_MODEL_E1000) { - if ((bhyveDriverGetCaps(conn) & BHYVE_CAP_NET_E1000) !=3D 0) { + if ((bhyveDriverGetBhyveCaps(driver) & BHYVE_CAP_NET_E1000) !=3D 0= ) { nic_model =3D g_strdup("e1000"); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -167,7 +167,7 @@ bhyveBuildConsoleArgStr(const virDomainDef *def, virCom= mandPtr cmd) static int bhyveBuildAHCIControllerArgStr(const virDomainDef *def, virDomainControllerDefPtr controller, - virConnectPtr conn, + bhyveConnPtr driver, virCommandPtr cmd) { virBuffer buf =3D VIR_BUFFER_INITIALIZER; @@ -208,13 +208,13 @@ bhyveBuildAHCIControllerArgStr(const virDomainDef *de= f, =20 switch (disk->device) { case VIR_DOMAIN_DISK_DEVICE_DISK: - if ((bhyveDriverGetCaps(conn) & BHYVE_CAP_AHCI32SLOT)) + if ((bhyveDriverGetBhyveCaps(driver) & BHYVE_CAP_AHCI32SLOT)) virBufferAsprintf(&device, ",hd:%s", disk_source); else virBufferAsprintf(&device, "-hd,%s", disk_source); break; case VIR_DOMAIN_DISK_DEVICE_CDROM: - if ((bhyveDriverGetCaps(conn) & BHYVE_CAP_AHCI32SLOT)) + if ((bhyveDriverGetBhyveCaps(driver) & BHYVE_CAP_AHCI32SLOT)) virBufferAsprintf(&device, ",cd:%s", disk_source); else virBufferAsprintf(&device, "-cd,%s", disk_source); @@ -323,7 +323,7 @@ static int bhyveBuildGraphicsArgStr(const virDomainDef *def, virDomainGraphicsDefPtr graphics, virDomainVideoDefPtr video, - virConnectPtr conn, + bhyveConnPtr driver, virCommandPtr cmd, bool dryRun) { @@ -332,9 +332,7 @@ bhyveBuildGraphicsArgStr(const virDomainDef *def, bool escapeAddr; unsigned short port; =20 - bhyveConnPtr driver =3D conn->privateData; - - if (!(bhyveDriverGetCaps(conn) & BHYVE_CAP_LPC_BOOTROM) || + if (!(bhyveDriverGetBhyveCaps(driver) & BHYVE_CAP_LPC_BOOTROM) || def->os.bootloader || !def->os.loader) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -343,7 +341,7 @@ bhyveBuildGraphicsArgStr(const virDomainDef *def, return -1; } =20 - if (!(bhyveDriverGetCaps(conn) & BHYVE_CAP_FBUF)) { + if (!(bhyveDriverGetBhyveCaps(driver) & BHYVE_CAP_FBUF)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Bhyve version does not support framebuffer")); return -1; @@ -434,7 +432,7 @@ bhyveBuildGraphicsArgStr(const virDomainDef *def, } =20 virCommandPtr -virBhyveProcessBuildBhyveCmd(virConnectPtr conn, +virBhyveProcessBuildBhyveCmd(bhyveConnPtr driver, virDomainDefPtr def, bool dryRun) { /* @@ -467,7 +465,7 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn, goto error; } =20 - if ((bhyveDriverGetCaps(conn) & BHYVE_CAP_CPUTOPOLOGY) !=3D 0) { + if ((bhyveDriverGetBhyveCaps(driver) & BHYVE_CAP_CPUTOPOLOGY) !=3D= 0) { virCommandAddArgFormat(cmd, "cpus=3D%d,sockets=3D%d,cores=3D%d= ,threads=3D%d", nvcpus, def->cpu->sockets, @@ -506,7 +504,7 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn, /* used by default in bhyve */ break; case VIR_DOMAIN_CLOCK_OFFSET_UTC: - if ((bhyveDriverGetCaps(conn) & BHYVE_CAP_RTC_UTC) !=3D 0) { + if ((bhyveDriverGetBhyveCaps(driver) & BHYVE_CAP_RTC_UTC) !=3D 0) { virCommandAddArg(cmd, "-u"); } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -540,7 +538,7 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn, =20 if (def->os.bootloader =3D=3D NULL && def->os.loader) { - if ((bhyveDriverGetCaps(conn) & BHYVE_CAP_LPC_BOOTROM)) { + if ((bhyveDriverGetBhyveCaps(driver) & BHYVE_CAP_LPC_BOOTROM)) { virCommandAddArg(cmd, "-l"); virCommandAddArgFormat(cmd, "bootrom,%s", def->os.loader->path= ); } else { @@ -563,7 +561,7 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn, } break; case VIR_DOMAIN_CONTROLLER_TYPE_SATA: - if (bhyveBuildAHCIControllerArgStr(def, controller, conn, = cmd) < 0) + if (bhyveBuildAHCIControllerArgStr(def, controller, driver= , cmd) < 0) goto error; break; case VIR_DOMAIN_CONTROLLER_TYPE_USB: @@ -580,7 +578,7 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn, } for (i =3D 0; i < def->nnets; i++) { virDomainNetDefPtr net =3D def->nets[i]; - if (bhyveBuildNetArgStr(conn, def, net, cmd, dryRun) < 0) + if (bhyveBuildNetArgStr(driver, def, net, cmd, dryRun) < 0) goto error; } for (i =3D 0; i < def->ndisks; i++) { @@ -604,7 +602,7 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn, if (def->ngraphics && def->nvideos) { if (def->ngraphics =3D=3D 1 && def->nvideos =3D=3D 1) { if (bhyveBuildGraphicsArgStr(def, def->graphics[0], def->video= s[0], - conn, cmd, dryRun) < 0) + driver, cmd, dryRun) < 0) goto error; } else { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -747,7 +745,7 @@ virBhyveFormatGrubDevice(virBufferPtr devicemap, virDom= ainDiskDefPtr def) =20 static virCommandPtr virBhyveProcessBuildGrubbhyveCmd(virDomainDefPtr def, - virConnectPtr conn, + bhyveConnPtr driver, const char *devmap_file, char **devicesmap_out) { @@ -830,7 +828,7 @@ virBhyveProcessBuildGrubbhyveCmd(virDomainDefPtr def, virCommandAddArgFormat(cmd, "%llu", VIR_DIV_UP(virDomainDefGetMemoryInitial(def), 1= 024)); =20 - if ((bhyveDriverGetGrubCaps(conn) & BHYVE_GRUB_CAP_CONSDEV) !=3D 0 && + if ((bhyveDriverGetGrubCaps(driver) & BHYVE_GRUB_CAP_CONSDEV) !=3D 0 && def->nserials > 0) { virDomainChrDefPtr chr; =20 @@ -939,7 +937,7 @@ virBhyveGetBootDisk(virDomainDefPtr def) } =20 virCommandPtr -virBhyveProcessBuildLoadCmd(virConnectPtr conn, virDomainDefPtr def, +virBhyveProcessBuildLoadCmd(bhyveConnPtr driver, virDomainDefPtr def, const char *devmap_file, char **devicesmap_out) { virDomainDiskDefPtr disk =3D NULL; @@ -952,7 +950,7 @@ virBhyveProcessBuildLoadCmd(virConnectPtr conn, virDoma= inDefPtr def, =20 return virBhyveProcessBuildBhyveloadCmd(def, disk); } else if (strstr(def->os.bootloader, "grub-bhyve") !=3D NULL) { - return virBhyveProcessBuildGrubbhyveCmd(def, conn, devmap_file, + return virBhyveProcessBuildGrubbhyveCmd(def, driver, devmap_file, devicesmap_out); } else { return virBhyveProcessBuildCustomLoaderCmd(def); diff --git a/src/bhyve/bhyve_command.h b/src/bhyve/bhyve_command.h index 8c39f4eb2f..5a934c4883 100644 --- a/src/bhyve/bhyve_command.h +++ b/src/bhyve/bhyve_command.h @@ -29,7 +29,7 @@ =20 #define BHYVE_CONFIG_FORMAT_ARGV "bhyve-argv" =20 -virCommandPtr virBhyveProcessBuildBhyveCmd(virConnectPtr conn, +virCommandPtr virBhyveProcessBuildBhyveCmd(bhyveConnPtr driver, virDomainDefPtr def, bool dryRun); =20 @@ -38,5 +38,5 @@ virBhyveProcessBuildDestroyCmd(bhyveConnPtr driver, virDomainDefPtr def); =20 virCommandPtr -virBhyveProcessBuildLoadCmd(virConnectPtr conn, virDomainDefPtr def, +virBhyveProcessBuildLoadCmd(bhyveConnPtr driver, virDomainDefPtr def, const char *devmap_file, char **devicesmap_out= ); diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 713301399e..365a3777a0 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -710,22 +710,22 @@ bhyveConnectDomainXMLToNative(virConnectPtr conn, goto cleanup; } =20 - if ((bhyveDriverGetCaps(conn) & BHYVE_CAP_LPC_BOOTROM) =3D=3D 0) { + if ((bhyveDriverGetBhyveCaps(privconn) & BHYVE_CAP_LPC_BOOTROM) = =3D=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Installed bhyve binary does not support " "bootrom")); goto cleanup; } } else { - if (!(loadcmd =3D virBhyveProcessBuildLoadCmd(conn, def, "", - NULL))) + if (!(loadcmd =3D virBhyveProcessBuildLoadCmd(privconn, def, + "", NULL))) goto cleanup; =20 virBufferAdd(&buf, virCommandToString(loadcmd, false), -1); virBufferAddChar(&buf, '\n'); } =20 - if (!(cmd =3D virBhyveProcessBuildBhyveCmd(conn, def, true))) + if (!(cmd =3D virBhyveProcessBuildBhyveCmd(privconn, def, true))) goto cleanup; =20 virBufferAdd(&buf, virCommandToString(cmd, false), -1); @@ -1282,20 +1282,16 @@ bhyveStateInitialize(bool privileged, } =20 unsigned -bhyveDriverGetCaps(virConnectPtr conn) +bhyveDriverGetBhyveCaps(bhyveConnPtr driver) { - bhyveConnPtr driver =3D conn->privateData; - if (driver !=3D NULL) return driver->bhyvecaps; return 0; } =20 unsigned -bhyveDriverGetGrubCaps(virConnectPtr conn) +bhyveDriverGetGrubCaps(bhyveConnPtr driver) { - bhyveConnPtr driver =3D conn->privateData; - if (driver !=3D NULL) return driver->grubcaps; return 0; @@ -1543,7 +1539,7 @@ bhyveConnectDomainXMLFromNative(virConnectPtr conn, char *xml =3D NULL; virDomainDefPtr def =3D NULL; bhyveConnPtr privconn =3D conn->privateData; - unsigned caps =3D bhyveDriverGetCaps(conn); + unsigned bhyveCaps =3D bhyveDriverGetBhyveCaps(privconn); =20 virCheckFlags(0, NULL); =20 @@ -1556,7 +1552,8 @@ bhyveConnectDomainXMLFromNative(virConnectPtr conn, goto cleanup; } =20 - def =3D bhyveParseCommandLineString(nativeConfig, caps, privconn->xmlo= pt); + def =3D bhyveParseCommandLineString(nativeConfig, bhyveCaps, + privconn->xmlopt); if (def =3D=3D NULL) goto cleanup; =20 diff --git a/src/bhyve/bhyve_driver.h b/src/bhyve/bhyve_driver.h index 98e75039a3..75a63e0233 100644 --- a/src/bhyve/bhyve_driver.h +++ b/src/bhyve/bhyve_driver.h @@ -25,8 +25,8 @@ =20 int bhyveRegister(void); =20 -unsigned bhyveDriverGetCaps(virConnectPtr conn); +unsigned bhyveDriverGetBhyveCaps(bhyveConnPtr driver); =20 -unsigned bhyveDriverGetGrubCaps(virConnectPtr conn); +unsigned bhyveDriverGetGrubCaps(bhyveConnPtr driver); =20 virCapsPtr bhyveDriverGetCapabilities(bhyveConnPtr driver); diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c index 14f718403d..2ea8db3b55 100644 --- a/src/bhyve/bhyve_process.c +++ b/src/bhyve/bhyve_process.c @@ -140,9 +140,7 @@ virBhyveProcessStart(virConnectPtr conn, goto cleanup; =20 /* Call bhyve to start the VM */ - if (!(cmd =3D virBhyveProcessBuildBhyveCmd(conn, - vm->def, - false))) + if (!(cmd =3D virBhyveProcessBuildBhyveCmd(driver, vm->def, false))) goto cleanup; =20 virCommandSetOutputFD(cmd, &logfd); @@ -158,8 +156,8 @@ virBhyveProcessStart(virConnectPtr conn, =20 virBhyveFormatDevMapFile(vm->def->name, &devmap_file); =20 - if (!(load_cmd =3D virBhyveProcessBuildLoadCmd(conn, vm->def, devm= ap_file, - &devicemap))) + if (!(load_cmd =3D virBhyveProcessBuildLoadCmd(driver, vm->def, + devmap_file, &devicem= ap))) goto cleanup; virCommandSetOutputFD(load_cmd, &logfd); virCommandSetErrorFD(load_cmd, &logfd); diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index 3c9c61f024..9e7eb218b8 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -51,11 +51,11 @@ static int testCompareXMLToArgvFiles(const char *xml, =20 conn->privateData =3D &driver; =20 - cmd =3D virBhyveProcessBuildBhyveCmd(conn, vmdef, false); + cmd =3D virBhyveProcessBuildBhyveCmd(&driver, vmdef, false); if (vmdef->os.loader) ldcmd =3D virCommandNew("dummy"); else - ldcmd =3D virBhyveProcessBuildLoadCmd(conn, vmdef, "", + ldcmd =3D virBhyveProcessBuildLoadCmd(&driver, vmdef, "", &actualdm); =20 if ((cmd =3D=3D NULL) || (ldcmd =3D=3D NULL)) { --=20 2.24.1