From nobody Tue Aug 11 14:24:26 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hKDQg2SfWz6nnkr for ; Tue, 11 Aug 2026 14:24:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hKDQf69jvz3vdt for ; Tue, 11 Aug 2026 14:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786458266; h=from:from: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; bh=Qy06lxKQa0wQLcZ4ez87BJnYuKJCfc45qiJvS8RUynk=; b=cBT73ZE3/rVSmlJkPJ2W5eiaty9s4i0DTDn+mzhVAEcvvApSK0HWa5yYzCoJTs8zstQJbt P71rZFDGa70Iifc1s8VVU7YrGsZ0305QiAFufeCHnn8MmNwi3E/Bg8sh94angfMGPSGS8w AN+PrUBXFGvk9Kf3WZjQSnqVnqFhNE4LhCzj3u8X66yZaA+553ncXv01SQC3L3n9xo3bPo qHlxYMxETzGAsMJV/JjxCCNe8qjch3bABXbuvaNDQxbm6fwusVticRt4+A+udjEJMbM47S 64fIgGXD9zIEWFl8gxOCPoGagCoa5dcP4oxGlectGVZrwtgRP5od69GKtR2gwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786458266; a=rsa-sha256; cv=none; b=rM3Q0Q1Na02h4xt6XWoFViqg1g7rKKw6Ph/HnHxbQ4uCBMRDEEckz4A/VL8rk3DUsGWnNT 1PCZgM1VVLlPSz8aqawk6X+8S2tFIeRebRKpAvku20aqnZG8nTFhzKwSznppka8Su8RgWm IUGdiOvQm9+Qx455lMPqsmvS9gTNzzr1BJrt5wX2cgSBYlNRUZaC6OyMhKILcGUDBNMc1n ZLlAFfwyp93YIuc+jy7SLCxK81/36hKq0XMz9IzQQC6ycpd26HM7N8SET1wXEGwKlhQw/o IHwXEvToaIieLXVLCkjKLcoHW/s5hSqX9xacSJZ1pPl+SahCDsUgZi6is0k+jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786458266; h=from:from: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; bh=Qy06lxKQa0wQLcZ4ez87BJnYuKJCfc45qiJvS8RUynk=; b=gozWAwM6P9VOM07WR1EiuM87N5893KCeyfys4uxhv3SykIJt73NWfhCZLO/7a+lLcIPWT/ BuegXq/XcnEB7IMRHVJuCk+A34MCQ6yGOzHcwhf3obm5UwVLXS93/e2GdmmqhradwOh8b3 5iKaAQnzzhFIlz8CKu/SyeQg63NWPaEwEHzWY2OH5MJNfp0PabNwPglme56jLwXQiLwSmC hS+tT4/87rlsaRbb4o9fE/EuzOSUYvWn+BV1OWmkGfD6tXk1q8v/YlXAQkRl87/HvppCPW +wUyDRdTFBz31KRheT4yhdNo0cAMkf0l63LGUEl/ZNE4KVKeaGUjjVcVZVLw/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hKDQf5BX1zypq for ; Tue, 11 Aug 2026 14:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 249ed by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 11 Aug 2026 14:24:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Nimish Jain From: Mark Johnston Subject: git: 80d82fca1f0d - main - bhyve: add deprecation warning function List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80d82fca1f0d741173006021dafb259590f1d1d9 Auto-Submitted: auto-generated Date: Tue, 11 Aug 2026 14:24:26 +0000 Message-Id: <6a7b309a.249ed.3f7d5403@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=80d82fca1f0d741173006021dafb259590f1d1d9 commit 80d82fca1f0d741173006021dafb259590f1d1d9 Author: Nimish Jain AuthorDate: 2026-08-11 14:12:39 +0000 Commit: Mark Johnston CommitDate: 2026-08-11 14:15:02 +0000 bhyve: add deprecation warning function Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D58636 --- usr.sbin/bhyve/amd64/bhyverun_machdep.c | 12 ++---------- usr.sbin/bhyve/bhyverun.c | 10 ++++++++++ usr.sbin/bhyve/bhyverun.h | 1 + 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bhyve/amd64/bhyverun_machdep.c b/usr.sbin/bhyve/amd64/bhyverun_machdep.c index 2c8f825b4a7c..5b23807b30d5 100644 --- a/usr.sbin/bhyve/amd64/bhyverun_machdep.c +++ b/usr.sbin/bhyve/amd64/bhyverun_machdep.c @@ -266,16 +266,8 @@ bhyve_optparse(int argc, char **argv) } /* Handle backwards compatibility aliases in config options. */ - if (get_config_value("lpc.bootrom") != NULL && - get_config_value("bootrom") == NULL) { - warnx("lpc.bootrom is deprecated, use '-o bootrom' instead"); - set_config_value("bootrom", get_config_value("lpc.bootrom")); - } - if (get_config_value("lpc.bootvars") != NULL && - get_config_value("bootvars") == NULL) { - warnx("lpc.bootvars is deprecated, use '-o bootvars' instead"); - set_config_value("bootvars", get_config_value("lpc.bootvars")); - } + bhyve_cfg_warn("lpc.bootrom", "bootrom"); + bhyve_cfg_warn("lpc.bootvars", "bootvars"); } void diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index ace631594544..09605b7c114f 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -242,6 +242,16 @@ out: return (-1); } +void +bhyve_cfg_warn(const char *old, const char *new) +{ + if (get_config_value(old) != NULL && + get_config_value(new) == NULL) { + warnx("'%s' is deprecated, use '%s' instead", old, new); + set_config_value(new, get_config_value(old)); + } +} + static void calc_mem_affinity(size_t vm_memsize) { diff --git a/usr.sbin/bhyve/bhyverun.h b/usr.sbin/bhyve/bhyverun.h index 5e6c81d008b8..a6fddd9f11f8 100644 --- a/usr.sbin/bhyve/bhyverun.h +++ b/usr.sbin/bhyve/bhyverun.h @@ -84,6 +84,7 @@ void bhyve_parse_gdb_options(const char *opt); int bhyve_pincpu_parse(const char *opt); int bhyve_topology_parse(const char *opt); int bhyve_numa_parse(const char *opt); +void bhyve_cfg_warn(const char *old, const char *new); void bhyve_init_vcpu(struct vcpu *vcpu); void bhyve_start_vcpu(struct vcpu *vcpu, bool bsp);