From nobody Sat May 20 11:21:36 2023 X-Original-To: dev-commits-src-all@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 4QNh9s1w8fz4Bxbc; Sat, 20 May 2023 11:21:37 +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 4QNh9r6Kwxz41vV; Sat, 20 May 2023 11:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684581696; 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=Xmh8YBpTP+3Q53HdFyWRNNQcofYEYu0NVkHgh5P5WZg=; b=x0pcFyvgRH6yZizAfngS/8TCtjfCJbCGYh5lcwFPqHyyHv8EvmBfo1XaXBZYr3qrPmqZql 5KuKrHs77VN4HO7cmjWKPcdctNUS2MIHE5bvhWIImj+0cwaedUW81DmUcs2sh6TLqVrDeU tdNczhyTKjzSOIn4mLrivkk17Ar4wvDog/PFr8se4mm7LGFMAR1PRQWzkfxu4ZXCmZZw6a RmQvbP+wSme+6ZnaGjaIV9XydRxcn/tTjZbXrRUtM/rOsWrvLg23ulBsfx8gfKGbM3Wu99 q+10P9b365pgNNANJSSvDmkESRx53uGy2cUd9GPigfT90TI84cxMqeUsMHhFbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684581696; 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=Xmh8YBpTP+3Q53HdFyWRNNQcofYEYu0NVkHgh5P5WZg=; b=TulzxQVgvCFtblgC+jlXiwclSg3m5jjnSdND1Thtte63oMzqdDzJXYPzmLhZhxX5FR5cWB rFPM07kA+WD8uhjPu/LJ4wUHwJdSu+awgLyhu1XN4BXCrsWAOxRCoy1TyZkU0L5SULGdcq 05e4YccbzMExHhgD98g4dneI/xKUMQr6ojBWPbwZVImXF6Mr8T0Kvj0T7Sm8EufpwaBBvl u5IYZSb2WMm4MXea1oZTYar7y1nkU0Bbg+4w8Gd1J6Mj+pIS7ca25CRr7xMUbpNm8FLwB8 V733LX6dS1TLYr+iSUV7/8bwAgFlBMiBlSXNMo41eWDi4PTO8XzQgrVN4yQd1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684581696; a=rsa-sha256; cv=none; b=JMskafbZi6Zd4IVubKrbLOTv6aLl12Ppz5PlyrCQS1AOdJITcEIqo2TBrTAOw8MhcF6Eml 52YwPpciaGyeE+8pWg/n9izq+d+3k/mMbXo/USi/MXz3ATikfi4FPtMsZOPZ2HEw/rg45H nYFNwD8PJ53QPmrsCiWNFVupd7DqkalYsV/lnZSqOokSLWFVG6oZ2OnFhBugBkB+UiUaX/ omgy9DTFEI/R5nW0Z0SmP6j1rRNY9LJDUnjT4qqqQpycy5dD28xdU2z7D6t4BWRdAXenAb H+diXhw00OWNrDL1K77smSF3vxMRWucTBks2mVGfhRon3Kr8wSy+evORWr/EkQ== 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 4QNh9r2lxwz16VD; Sat, 20 May 2023 11:21:36 +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 34KBLanO096850; Sat, 20 May 2023 11:21:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34KBLaGL096849; Sat, 20 May 2023 11:21:36 GMT (envelope-from git) Date: Sat, 20 May 2023 11:21:36 GMT Message-Id: <202305201121.34KBLaGL096849@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 5138ffa87716 - main - fwget: remove logging redirects List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5138ffa877161ddfe3a690a45cf716e09c5e865a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5138ffa877161ddfe3a690a45cf716e09c5e865a commit 5138ffa877161ddfe3a690a45cf716e09c5e865a Author: Bjoern A. Zeeb AuthorDate: 2023-05-12 11:47:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-05-20 11:20:41 +0000 fwget: remove logging redirects After adding addpkg() in 10aa369afd9946da18ae51b07aeadc3314fba56d the redirects are no longer needed. We can now log directly so simplify the code. Reported by: manu Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D40077 --- usr.sbin/fwget/fwget.sh | 11 ++--------- usr.sbin/fwget/pci/pci | 4 ++-- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/usr.sbin/fwget/fwget.sh b/usr.sbin/fwget/fwget.sh index 5e50569c3991..89177d936107 100644 --- a/usr.sbin/fwget/fwget.sh +++ b/usr.sbin/fwget/fwget.sh @@ -44,14 +44,9 @@ EOF exit 1 } -log_start() -{ - exec 3>&1 4>&2 -} - log() { - echo $@ 1>&3 + echo $@ } log_verbose() @@ -60,7 +55,7 @@ log_verbose() return fi - echo $@ 1>&3 + echo $@ } addpkg() @@ -82,8 +77,6 @@ addpkg() DRY_RUN=n VERBOSE=n -log_start - while [ $# -gt 0 ]; do case $1 in -n) diff --git a/usr.sbin/fwget/pci/pci b/usr.sbin/fwget/pci/pci index b3514c3ab43d..6a66049842e2 100644 --- a/usr.sbin/fwget/pci/pci +++ b/usr.sbin/fwget/pci/pci @@ -94,13 +94,13 @@ pci_search_packages() fi device=$(pci_get_device "${fulldevice}") - log_verbose "Trying to match device ${device} in class ${class} and vendor ${vendor} with pci_${class}_${vendor}" 1>&3 + log_verbose "Trying to match device ${device} in class ${class} and vendor ${vendor} with pci_${class}_${vendor}" if [ ! -f ${LIBEXEC_PATH}/pci_${class}_${vendor} ]; then class=$(pci_fixup_class ${class} ${vendor}) if [ -z "${class}" ]; then continue fi - log_verbose "Trying to match device ${device} in fixed up class ${class} and vendor ${vendor} with pci_${class}_${vendor}" 1>&3 + log_verbose "Trying to match device ${device} in fixed up class ${class} and vendor ${vendor} with pci_${class}_${vendor}" if [ ! -f ${LIBEXEC_PATH}/pci_${class}_${vendor} ]; then continue fi