From nobody Fri Jan 14 13:42:07 2022 X-Original-To: dev-commits-src-branches@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 70CB71940B50; Fri, 14 Jan 2022 13:42:08 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jb2Xc0vvqz50bN; Fri, 14 Jan 2022 13:42:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642167728; h=from:from: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; bh=1I+GZbzwKJIOBc9BmRQ1U51dO9fPQbQfFQW2BBNZMF4=; b=e8JPB8gvff/KNjHw/I0qOh+xWn5g0kdQhnVrq9pheFf+9lEXDTfd7lyO4Mcl+SzjaSuoUA X8oKbUeUYPd6IAz9GzWOO8rzYl3vxIpEfQ8Y636vfr1rBhI96nhoToRo5bXXcCpkyv8so/ IpknYRcnO7uv8S2JLZ213WawTLkZXYAkKP0vpK7FnXtx9fjqWAmXUXbm4UJlDhmHDI9Y3e lqdVV+uT4/uT/RGK+se9EWRi6ORBkaQybwfBGr+RxEfV01iIRfQhzBLWJcWli4fDPT+nr8 eQYa7mCSobIKC1FurQB/SxZU+YujyfYQ6TBxrqxMl+7b/5dwCl/3p9w38Ar3Vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C282147F2; Fri, 14 Jan 2022 13:42:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20EDg7cQ034340; Fri, 14 Jan 2022 13:42:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20EDg7FS034338; Fri, 14 Jan 2022 13:42:07 GMT (envelope-from git) Date: Fri, 14 Jan 2022 13:42:07 GMT Message-Id: <202201141342.20EDg7FS034338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: a327bd30588f - stable/13 - loader: Fix pnpmatch and add some usage List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a327bd30588f6b5b7353ea50e06d042a47aa3f9a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642167728; h=from:from: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; bh=1I+GZbzwKJIOBc9BmRQ1U51dO9fPQbQfFQW2BBNZMF4=; b=BoQzN1s+D52ByeuceryLD17aF1S/usANlFX9/YOAdJrYnMFgKg3eRTx874DGlDwXWHXlHC kkOwAExVItPn+s2bRD3nYcbSFhQhwp+j8vm+qCfFI/Ya67c5L/Sa2jWlXqbxv6nErR2ZHU 1OuXLTMZAxRHbW5oJ5B7HxiDE41nB8PRHfNng0Vi0h+ywWU/ngOubT4qOfChW7Ike+N3qk rMa1hDitvuoQwiD8bVMzfEkik3eNTICw5GZMrDYkTcxjz/DdrKVS9jELU34kiI7wrOtHVX hwcwlekOk7LpmjoWccz8RRMoCWif8C8wYutb5UpVcg5K7a8O1aGfIhYLGov32Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642167728; a=rsa-sha256; cv=none; b=Hjj7OYQCWdL2By+chCY+oWpp60fA00SzxfoIFzCS40a4cCyaekUhVgpRmxtV/4t1VDAHI2 wFkMZhtFhR8AngvrQbrIioIx1JH0HijSCDegxKJ7dpdz7dCOgrQsfqMsLm/IgpUCx6ej26 Xyhpi2jhiRX8uDxLpZau+2UK5C8i642mdQFa0bfCb50/rpXKUQrLtC7MTM6SebFpHcROZs FYUfnaexWw+X/Ec9ZZ34YGUa3oDPj1VkzVZv6r077OOlZuKrL/jAlW4R4not8+P0PAlNCw uCyWSR0BvTlBr57YlnXDnDWFz5WoxODA1q/dxcfqIWrDiSCknzCN/zrT9GoveA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=a327bd30588f6b5b7353ea50e06d042a47aa3f9a commit a327bd30588f6b5b7353ea50e06d042a47aa3f9a Author: Emmanuel Vadot AuthorDate: 2021-11-14 14:11:24 +0000 Commit: Emmanuel Vadot CommitDate: 2022-01-14 13:37:39 +0000 loader: Fix pnpmatch and add some usage pnpmatch needs a busname and a compat data. (cherry picked from commit 544af629a4906be1873983dfa129e65bc5d0c3df) --- stand/common/module.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/stand/common/module.c b/stand/common/module.c index 8bddd9f56f52..9b001089149d 100644 --- a/stand/common/module.c +++ b/stand/common/module.c @@ -381,14 +381,19 @@ command_pnpmatch(int argc, char *argv[]) return(CMD_OK); } } - argv += (optind - 1); - argc -= (optind - 1); + argv += optind; + argc -= optind; - module = mod_searchmodule_pnpinfo(argv[1], argv[2]); + if (argc != 2) { + command_errmsg = "Usage: pnpmatch compat="; + return (CMD_CRIT); + } + + module = mod_searchmodule_pnpinfo(argv[0], argv[1]); if (module) printf("Matched module: %s\n", module); - else if(argv[1]) - printf("No module matches %s\n", argv[1]); + else + printf("No module matches %s on bus %s\n", argv[1], argv[0]); return (CMD_OK); }