From: Dragan Simic <dsimic@manjaro.org>
Date: Tue, 6 Feb 2024 11:00:04 +0000 (+0100)
Subject: scripts: dtc-version: Don't show error messages
X-Git-Tag: v2025.01-rc5-pxa1908~578^2~20^2~21
X-Git-Url: http://git.dujemihanovic.xyz/img/static//%22brlog.php?a=commitdiff_plain;h=5b3f9698c16313fb780d784c69856cea74272476;p=u-boot.git

scripts: dtc-version: Don't show error messages

Prevent the error messages produced by which(1), such as the one quoted
below, from being visible in the build outputs.

    which: no dtc in (./scripts/dtc)

This makes the build outputs look a tiny bit cleaner.

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---

diff --git a/scripts/dtc-version.sh b/scripts/dtc-version.sh
index 53ff868bcd..18c59ac1e2 100755
--- a/scripts/dtc-version.sh
+++ b/scripts/dtc-version.sh
@@ -15,7 +15,7 @@ if [ ${#dtc} -eq 0 ]; then
 	exit 1
 fi
 
-if ! which $dtc >/dev/null ; then
+if ! which $dtc > /dev/null 2>&1 ; then
 	echo "Error: Cannot find dtc: $dtc"
 	exit 1
 fi