diff mbox series

[v2] scripts: dtc-version: Don't show error messages

Message ID 5ece6e37de9321ad1c2e089659cbd80355181c4a.1707217112.git.dsimic@manjaro.org
State Accepted
Commit 5b3f9698c16313fb780d784c69856cea74272476
Delegated to: Tom Rini
Headers show
Series [v2] scripts: dtc-version: Don't show error messages | expand

Commit Message

Dragan Simic Feb. 6, 2024, 11 a.m. UTC
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>
---

Notes:
    Version 2 incorporates the suggestion from Quentin to use a more compact
    version of the redirection, which is already used in multiple places.
    The original motivation to use the more verbose version was to prevent
    possible issues with some shells, or with some older shell versions, which
    may not recognize the compact version.

 scripts/dtc-version.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dragan Simic Feb. 14, 2024, 3:48 a.m. UTC | #1
On 2024-02-06 12:00, Dragan Simic wrote:
> 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.

Just checking, is there something that prevents this patch from
becoming merged?

> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
> Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> ---
> 
> Notes:
>     Version 2 incorporates the suggestion from Quentin to use a more 
> compact
>     version of the redirection, which is already used in multiple 
> places.
>     The original motivation to use the more verbose version was to 
> prevent
>     possible issues with some shells, or with some older shell 
> versions, which
>     may not recognize the compact version.
> 
>  scripts/dtc-version.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/dtc-version.sh b/scripts/dtc-version.sh
> index 53ff868bcdce..18c59ac1e255 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
Tom Rini Feb. 15, 2024, 1:13 p.m. UTC | #2
On Wed, Feb 14, 2024 at 04:48:52AM +0100, Dragan Simic wrote:
> On 2024-02-06 12:00, Dragan Simic wrote:
> > 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.
> 
> Just checking, is there something that prevents this patch from
> becoming merged?

I'll probably take this once the merge window opens, thanks.
Dragan Simic Feb. 15, 2024, 2:21 p.m. UTC | #3
On 2024-02-15 14:13, Tom Rini wrote:
> On Wed, Feb 14, 2024 at 04:48:52AM +0100, Dragan Simic wrote:
>> On 2024-02-06 12:00, Dragan Simic wrote:
>> > 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.
>> 
>> Just checking, is there something that prevents this patch from
>> becoming merged?
> 
> I'll probably take this once the merge window opens, thanks.

Great, thanks!
Dragan Simic Feb. 29, 2024, 8:02 p.m. UTC | #4
On 2024-02-15 15:21, Dragan Simic wrote:
> On 2024-02-15 14:13, Tom Rini wrote:
>> On Wed, Feb 14, 2024 at 04:48:52AM +0100, Dragan Simic wrote:
>>> On 2024-02-06 12:00, Dragan Simic wrote:
>>> > 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.
>>> 
>>> Just checking, is there something that prevents this patch from
>>> becoming merged?
>> 
>> I'll probably take this once the merge window opens, thanks.
> 
> Great, thanks!

Just a small reminder about, possibly, picking this up for -next.
Tom Rini March 4, 2024, 3:28 p.m. UTC | #5
On Tue, Feb 06, 2024 at 12:00:04PM +0100, Dragan Simic wrote:

> 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>

Applied to u-boot/next, thanks!
Dragan Simic March 4, 2024, 3:38 p.m. UTC | #6
On 2024-03-04 16:28, Tom Rini wrote:
> On Tue, Feb 06, 2024 at 12:00:04PM +0100, Dragan Simic wrote:
> 
>> 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>
> 
> Applied to u-boot/next, thanks!

Great, thank you!
diff mbox series

Patch

diff --git a/scripts/dtc-version.sh b/scripts/dtc-version.sh
index 53ff868bcdce..18c59ac1e255 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