From nobody Tue Nov 26 07:42:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.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 205.139.110.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=1582353607; cv=none; d=zohomail.com; s=zohoarc; b=EC01UOP7jJSf1i7ma6f6OpoA55TWlHCqDTScQyXffhHvpQ4Mp9fcmOgz1P1ECo/TOKmPp8Ud9GrBGapU2dmRPQHvOQFhPZ6J5UnZJQftctuqto5DlM1C8pq+Z3CPwoCgJyFXetoEErt7OwY7w3mbY2euW7c+JKpm8/QoKL6aA7U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582353607; 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=Ek2V5qcXlJm05q8aldPerksxoUlivHpFQSQ6ZDlUbK0=; b=UcrIy+hdZDQKsLTr2KnjJPp85LTD61R2cs9SXqIlb29U7KdquS+tAIBkjLjz4JxB1gk+qyf1Zu+inQRHi61MrbgMqpBA3vM3yBAcOl3T1p/Z4ZDrsYdprzReyhO0NZxnhnIg8gHN1/sGh1ETSBjX+lTAD5kdiqK1gu4ICYD+5Ok= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.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 [205.139.110.120]) by mx.zohomail.com with SMTPS id 1582353607572866.8115827076384; Fri, 21 Feb 2020 22:40:07 -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-234-8iBJC3kmMC22lJQrqqIEJg-1; Sat, 22 Feb 2020 01:40:03 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C2108800D5E; Sat, 22 Feb 2020 06:39:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9552991828; Sat, 22 Feb 2020 06:39:57 +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 5179A18089D0; Sat, 22 Feb 2020 06:39:57 +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 01M6dQPF021663 for ; Sat, 22 Feb 2020 01:39:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 853042063211; Sat, 22 Feb 2020 06:39:26 +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 7FC9D2063209 for ; Sat, 22 Feb 2020 06:39:24 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (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 471D4185A78F for ; Sat, 22 Feb 2020 06:39:24 +0000 (UTC) Received: from mail-yw1-f67.google.com (mail-yw1-f67.google.com [209.85.161.67]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-115-c-cvRj13NI-ewLeO9zRSKg-1; Sat, 22 Feb 2020 01:39:21 -0500 Received: by mail-yw1-f67.google.com with SMTP id b186so2648351ywc.1 for ; Fri, 21 Feb 2020 22:39:21 -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.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 22:39:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582353606; 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=Ek2V5qcXlJm05q8aldPerksxoUlivHpFQSQ6ZDlUbK0=; b=MQQ9suN4pm3PVgwvSjO13jZdDEUpFaS+ADZG5JZor5RDIUNIYqFroGheT3fm+4srw4f6Ic EQorrnnn07npr+9jf3/VBYeKVYJbdfXjBpwb1lg6dqANZ90vQxv/JsQyIqFxKPKOAJpcM8 RVqql3EaRR940fTxVfxvYZmANI7h9zM= X-MC-Unique: 8iBJC3kmMC22lJQrqqIEJg-1 X-MC-Unique: c-cvRj13NI-ewLeO9zRSKg-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=XRPKtbmkuUsPAjNTLfZpjP7Rdt8BQPbh4M75Dn27BNA=; b=iPha/SiK6SjpZ6J8bwdBjcmkEDmadDw0X+mijT5uE5qmHRXF+VXk2UtvY/k4Ihrpn6 iDTkZT5OzQASpl6IX1CjowFHNF8jaa0kDBpTomYAp7i+AosQsmnFsn27AlA0iVjsfDST sPZ1ZyCGTdcSkyJ9sQC9LVKE1jl+LMPjDep1fOK+j/zR2PmvV1KjWkuL6tUnIpUrpa4J E/JBCpFMwp9FHNw61r0diJ7uQ6RbEtBGzZHQn70PmGC+XgbHhNcuekm4yJI3R9pgHMHc TkTH9bLqILc8Dp3BPSHfOBWcOcVI5qp9QVqPHHzEV3Np7KhdtBEZ1NYa1P0luW8T4cpp XcXg== X-Gm-Message-State: APjAAAX2j7SF4MMlCGwrTOo5MrYHd7soy/bvS9rtxb9nlGXllQ569NN6 Cp1o0gnFRKO+TPzTRlSPqyKWrikkkNeeYSIYzL0rPpHo3aCqdID94sBY4mKAyngqDCKe0iSZWZP 8puiR18bINA9mBKTMN7tUchM0P5XZiEhVt++RZ9sYSqavrVudetzJ7MjN13VeOnF2pbA= X-Google-Smtp-Source: APXvYqwQ72Ir/y3OBRPs+Qno3WEJAYMNa5/iLsuZurqjLeQSNxwLJAXcS2yvqj3qdCUHzeZwa/02fg== X-Received: by 2002:a81:3845:: with SMTP id f66mr36736991ywa.220.1582353560300; Fri, 21 Feb 2020 22:39:20 -0800 (PST) From: Ryan Moeller X-Google-Original-From: Ryan Moeller To: libvir-list@redhat.com Subject: [PATCH 03/16] Remove redundant parameter to virBhyveProcessStart() Date: Sat, 22 Feb 2020 01:38:42 -0500 Message-Id: <20200222063855.89637-4-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 01M6dQPF021663 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.15 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 | 6 +++--- src/bhyve/bhyve_process.c | 18 ++++++++---------- src/bhyve/bhyve_process.h | 1 - 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 365a3777a0..7b8e4808f9 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -89,7 +89,7 @@ bhyveAutostartDomain(virDomainObjPtr vm, void *opaque) virObjectLock(vm); if (vm->autostart && !virDomainObjIsActive(vm)) { virResetLastError(); - ret =3D virBhyveProcessStart(data->conn, data->driver, vm, + ret =3D virBhyveProcessStart(data->conn, vm, VIR_DOMAIN_RUNNING_BOOTED, 0); if (ret < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, @@ -861,7 +861,7 @@ bhyveDomainCreateWithFlags(virDomainPtr dom, goto cleanup; } =20 - ret =3D virBhyveProcessStart(dom->conn, privconn, vm, + ret =3D virBhyveProcessStart(dom->conn, vm, VIR_DOMAIN_RUNNING_BOOTED, start_flags); =20 @@ -920,7 +920,7 @@ bhyveDomainCreateXML(virConnectPtr conn, goto cleanup; def =3D NULL; =20 - if (virBhyveProcessStart(conn, privconn, vm, + if (virBhyveProcessStart(conn, vm, VIR_DOMAIN_RUNNING_BOOTED, start_flags) < 0) { /* If domain is not persistent, remove its data */ diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c index 2ea8db3b55..b0b428eeb4 100644 --- a/src/bhyve/bhyve_process.c +++ b/src/bhyve/bhyve_process.c @@ -93,7 +93,6 @@ virBhyveFormatDevMapFile(const char *vm_name, char **fn_o= ut) =20 int virBhyveProcessStart(virConnectPtr conn, - bhyveConnPtr driver, virDomainObjPtr vm, virDomainRunningReason reason, unsigned int flags) @@ -106,12 +105,11 @@ virBhyveProcessStart(virConnectPtr conn, char ebuf[1024]; virCommandPtr cmd =3D NULL; virCommandPtr load_cmd =3D NULL; - bhyveConnPtr privconn =3D conn->privateData; + bhyveConnPtr driver =3D conn->privateData; bhyveDomainObjPrivatePtr priv =3D vm->privateData; int ret =3D -1, rc; =20 logfile =3D g_strdup_printf("%s/%s.log", BHYVE_LOG_DIR, vm->def->name); - if ((logfd =3D open(logfile, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR)) < 0) { virReportSystemError(errno, @@ -120,19 +118,19 @@ virBhyveProcessStart(virConnectPtr conn, goto cleanup; } =20 - VIR_FREE(privconn->pidfile); - if (!(privconn->pidfile =3D virPidFileBuildPath(BHYVE_STATE_DIR, - vm->def->name))) { + VIR_FREE(driver->pidfile); + if (!(driver->pidfile =3D virPidFileBuildPath(BHYVE_STATE_DIR, + vm->def->name))) { virReportSystemError(errno, "%s", _("Failed to build pidfile path")); goto cleanup; } =20 - if (unlink(privconn->pidfile) < 0 && + if (unlink(driver->pidfile) < 0 && errno !=3D ENOENT) { virReportSystemError(errno, _("Cannot remove state PID file %s"), - privconn->pidfile); + driver->pidfile); goto cleanup; } =20 @@ -146,7 +144,7 @@ virBhyveProcessStart(virConnectPtr conn, virCommandSetOutputFD(cmd, &logfd); virCommandSetErrorFD(cmd, &logfd); virCommandWriteArgLog(cmd, logfd); - virCommandSetPidFile(cmd, privconn->pidfile); + virCommandSetPidFile(cmd, driver->pidfile); virCommandDaemonize(cmd); =20 if (vm->def->os.loader =3D=3D NULL) { @@ -188,7 +186,7 @@ virBhyveProcessStart(virConnectPtr conn, if (virCommandRun(cmd, NULL) < 0) goto cleanup; =20 - if (virPidFileReadPath(privconn->pidfile, &vm->pid) < 0) { + if (virPidFileReadPath(driver->pidfile, &vm->pid) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Domain %s didn't show up"), vm->def->name); goto cleanup; diff --git a/src/bhyve/bhyve_process.h b/src/bhyve/bhyve_process.h index 4f62f6be4b..8419e44faa 100644 --- a/src/bhyve/bhyve_process.h +++ b/src/bhyve/bhyve_process.h @@ -24,7 +24,6 @@ #include "bhyve_utils.h" =20 int virBhyveProcessStart(virConnectPtr conn, - bhyveConnPtr driver, virDomainObjPtr vm, virDomainRunningReason reason, unsigned int flags); --=20 2.24.1