From nobody Sat Feb 7 15:30:12 2026 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=1578045491; cv=none; d=zohomail.com; s=zohoarc; b=Xhk1PSR0jhdnatq1KQAZnxQeSpE2N45YPD5M3yWADszElKXhzxs1HR7gRVEgGMDgXWjlkk6OlE/C3TpiyXBI902j3/umMFKLYD5B/cc/Mime00fYHztwi4Py2zeu058VGgZzBXkZBNbdUjXAXaiUk1DEQVepEC2CxLIfLtAU9Os= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578045491; h=Content-Type:Content-Transfer-Encoding:Cc: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=pGyoHdGbFK/gxSAGzDb81634mpYGou0xQoiRTBPbM4U=; b=UZ6eV7xahbsozYgUBsDsBbQpN/09hP0Tk+2cUFr3YF4LSs219+Ut1U+3QEo84u5IUReLCBtfrHYRdyWAmdJt7pyCk5emAC64V+KuWWJLu1a38Mtok7ZIU9FvvbR/uhd8SscdZosieluKACEL1qG4thfEb9VP+oYkDcqfIcyWc8c= 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 1578045491101234.58387205838426; Fri, 3 Jan 2020 01:58:11 -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-257-IjhmvSAYOpmsVT7Au_Gamg-1; Fri, 03 Jan 2020 04:58:08 -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 C09951005510; Fri, 3 Jan 2020 09:58:02 +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 9450AA4B60; Fri, 3 Jan 2020 09:58:02 +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 4A9E718095FF; Fri, 3 Jan 2020 09:57:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 002Hkq0x017533 for ; Thu, 2 Jan 2020 12:46:52 -0500 Received: by smtp.corp.redhat.com (Postfix) id 67F53AF981; Thu, 2 Jan 2020 17:46:52 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 62B2BAC953 for ; Thu, 2 Jan 2020 17:46:50 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.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 DC0A785A301 for ; Thu, 2 Jan 2020 17:46:49 +0000 (UTC) Received: from mail-yb1-f193.google.com (mail-yb1-f193.google.com [209.85.219.193]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-335-mi0s8g7RPJifKI_ILArIag-1; Thu, 02 Jan 2020 12:46:47 -0500 Received: by mail-yb1-f193.google.com with SMTP id a124so17605690ybg.2 for ; Thu, 02 Jan 2020 09:46:47 -0800 (PST) Received: from mp03.tn.ixsystems.com ([12.189.233.131]) by smtp.gmail.com with ESMTPSA id a202sm21904073ywe.8.2020.01.02.09.46.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jan 2020 09:46:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578045489; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=pGyoHdGbFK/gxSAGzDb81634mpYGou0xQoiRTBPbM4U=; b=GEu5VRUQlGZlTuMFRMsWykSNqk/+M2RqF8cMLk2L6nFFfmhOt/gTyhtnTYfe4iQGlw6EM6 v76bI7xATIvahm7Q3ttSjIdaBYy9wsDxASInTfsKGddJCbAz9/MQO6t8o0FzLUeaZA4kxA Jopt1J/R5uG6U9F4jIdLEww6p6msYfY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VHcPThDb+MIUppM3JBbqtX6FF60uxzFCKXGKBOb9MTA=; b=XnIdweCUIRjQJhpOJMoSBFD3SJtltKzjSRNJdXp856xl3gsbhLCrBlxn9Bfy9evzAz k5dd7HiWG4Iq53sOP6JwHeMKyO9cQvbrnB9I4Fd659rBcdd/ZuYaaD6sNqumtP2bs3D/ yY35itv7NuzWxz78zlxCbEJc5eDke6UAUee0WMMTy3e7qrU6eJA2dkyA13s6Zl1coTwr 8N8t9IqhF0p4Y1FFkZTlIOoWEs6jjg4ZsxPtR7affro8LZmQZ0LzQNnLppn9O4zF4oY3 4gLlXMP71cNKPXXnFcWptXwq4SGMlfHFHPzIbESxuElXH1LW+MF5uz5u/91BX8WXXic2 Qbgw== X-Gm-Message-State: APjAAAVyJLHgEHAceY/RaPiiJC+s9RAW7ADRQTkfbXNuDlk1yelCvCBu IG5OlBpQBQpdMK4Dbsp/tbIBNLX7pJu/+MF1Lk7Ir7W5vna/xe1irucStSziAFGd7S532wZzLQl wwJbiWi2/s1swYkcW1pHe2bqyBnufPXLb32FNKPN0RnMYIX+ujUN+XdwSlFVl64AMjPk= X-Google-Smtp-Source: APXvYqxl9EgaxGmogN3H4yyoosTaVI3j2OgOCHzWvlEV/JEZdQ8tIiRrrUR0fLvjCbwFqX+L6VMNFA== X-Received: by 2002:a25:c58d:: with SMTP id v135mr62360701ybe.422.1577987206954; Thu, 02 Jan 2020 09:46:46 -0800 (PST) From: Ryan Moeller X-Google-Original-From: Ryan Moeller To: libvir-list@redhat.com Date: Thu, 2 Jan 2020 17:46:27 +0000 Message-Id: <20200102174635.7231-5-ryan@iXsystems.com> In-Reply-To: <20200102174635.7231-1-ryan@iXsystems.com> References: <20200102174635.7231-1-ryan@iXsystems.com> MIME-Version: 1.0 X-MC-Unique: mi0s8g7RPJifKI_ILArIag-1 X-MC-Unique: IjhmvSAYOpmsVT7Au_Gamg-1 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 002Hkq0x017533 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Fri, 03 Jan 2020 04:57:56 -0500 Cc: Ryan Moeller Subject: [libvirt] [PATCH v2 04/12] Remove redundant parameter to virBhyveProcessStart() 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 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: Daniel P. Berrang=C3=A9 --- src/bhyve/bhyve_driver.c | 6 +++--- src/bhyve/bhyve_process.c | 16 +++++++--------- src/bhyve/bhyve_process.h | 1 - 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 760619a5a6..d591ff63e3 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, @@ -862,7 +862,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 @@ -921,7 +921,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 bddd4e9461..9352baf172 100644 --- a/src/bhyve/bhyve_process.c +++ b/src/bhyve/bhyve_process.c @@ -113,7 +113,6 @@ bhyveProcessStopHook(virDomainObjPtr vm, virHookBhyveOp= Type op) =20 int virBhyveProcessStart(virConnectPtr conn, - bhyveConnPtr driver, virDomainObjPtr vm, virDomainRunningReason reason, unsigned int flags) @@ -126,12 +125,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, @@ -140,19 +138,19 @@ virBhyveProcessStart(virConnectPtr conn, goto cleanup; } =20 - VIR_FREE(privconn->pidfile); - if (!(privconn->pidfile =3D virPidFileBuildPath(BHYVE_STATE_DIR, + 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 @@ -170,7 +168,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) { @@ -215,7 +213,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.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list