* [PATCH] scripts: dtc-version: Don't show error messages
@ 2024-02-06 3:56 Dragan Simic
2024-02-06 10:25 ` Quentin Schulz
0 siblings, 1 reply; 5+ messages in thread
From: Dragan Simic @ 2024-02-06 3:56 UTC (permalink / raw)
To: u-boot; +Cc: sjg, trini, martin
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>
---
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..6d3d7b68fdfa 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>/dev/null ; then
echo "Error: Cannot find dtc: $dtc"
exit 1
fi
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] scripts: dtc-version: Don't show error messages
2024-02-06 3:56 [PATCH] scripts: dtc-version: Don't show error messages Dragan Simic
@ 2024-02-06 10:25 ` Quentin Schulz
2024-02-06 10:37 ` Dragan Simic
0 siblings, 1 reply; 5+ messages in thread
From: Quentin Schulz @ 2024-02-06 10:25 UTC (permalink / raw)
To: Dragan Simic, u-boot; +Cc: sjg, trini, martin
Hi Dragan,
On 2/6/24 04:56, Dragan Simic wrote:
> [You don't often get email from dsimic@manjaro.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> 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>
> ---
> 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..6d3d7b68fdfa 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>/dev/null ; then
What about
which $dtc > /dev/null 2>&1
instead?
In any case,
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Thanks,
Quentin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scripts: dtc-version: Don't show error messages
2024-02-06 10:25 ` Quentin Schulz
@ 2024-02-06 10:37 ` Dragan Simic
2024-02-06 10:41 ` Quentin Schulz
0 siblings, 1 reply; 5+ messages in thread
From: Dragan Simic @ 2024-02-06 10:37 UTC (permalink / raw)
To: Quentin Schulz; +Cc: u-boot, sjg, trini, martin
Hello Quentin,
On 2024-02-06 11:25, Quentin Schulz wrote:
> On 2/6/24 04:56, 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>
>> ---
>> 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..6d3d7b68fdfa 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>/dev/null ; then
>
> What about
>
> which $dtc > /dev/null 2>&1
>
> instead?
That's exactly what I intended to use, but IIRC some shells
or some older versions of some shells may not recognize that,
so I went with a more verbose, but slightly safer option.
> Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Thanks for your review.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scripts: dtc-version: Don't show error messages
2024-02-06 10:37 ` Dragan Simic
@ 2024-02-06 10:41 ` Quentin Schulz
2024-02-06 10:43 ` Dragan Simic
0 siblings, 1 reply; 5+ messages in thread
From: Quentin Schulz @ 2024-02-06 10:41 UTC (permalink / raw)
To: Dragan Simic; +Cc: u-boot, sjg, trini, martin
Hi Dragan,
On 2/6/24 11:37, Dragan Simic wrote:
> [You don't often get email from dsimic@manjaro.org. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Hello Quentin,
>
> On 2024-02-06 11:25, Quentin Schulz wrote:
>> On 2/6/24 04:56, 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>
>>> ---
>>> 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..6d3d7b68fdfa 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>/dev/null ; then
>>
>> What about
>>
>> which $dtc > /dev/null 2>&1
>>
>> instead?
>
> That's exactly what I intended to use, but IIRC some shells
> or some older versions of some shells may not recognize that,
> so I went with a more verbose, but slightly safer option.
>
$ git -c core.pager='' grep "2>&1" scripts
scripts/Kbuild.include: if (which $(strip $(c))$(CC)) > /dev/null 2>&1
; then \
scripts/Kbuild.include: if ($(1)) >/dev/null 2>&1; \
scripts/Kbuild.include:cc-name = $(shell $(CC) -v 2>&1 | grep -q "clang
version" && echo clang || echo gcc)
scripts/Kconfig.include:if-success = $(shell,{ $(1); } >/dev/null 2>&1
&& echo "$(2)" || echo "$(3)")
scripts/checkpatch.pl: $maintained_status{$filename} = `perl
$root/scripts/get_maintainer.pl --status --nom --nol --nogit
--nogit-fallback -f $filename 2>&1`;
scripts/checkpatch.pl: my $output = `${git_command} log --no-color
--format='%H %s' -1 $commit 2>&1`;
scripts/coccicheck:echo $SPFLAGS | grep -Ee "--profile|--show-trying"
2>&1 > /dev/null
scripts/decodecode: ${CROSS_COMPILE}as $AFLAGS -o $1.o $1.s > /dev/null 2>&1
scripts/decodecode: grep -v "/tmp\|Disassembly\|\.text\|^$" > $1.dis 2>&1
scripts/gcc-stack-usage.sh:cat <<END | $@ -Werror -fstack-usage -x c -
-c -o $TMP >/dev/null 2>&1 \
scripts/get_maintainer.pl: my $output = `git ls-remote --exit-code -h
"$url" $branch > /dev/null 2>&1`;
scripts/get_maintainer.pl: $cmd .= " 2>&1";
scripts/kernel-doc: open IN, "$cmd --version 2>&1 |";
So we're probably fine?
Cheers,
Quentin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scripts: dtc-version: Don't show error messages
2024-02-06 10:41 ` Quentin Schulz
@ 2024-02-06 10:43 ` Dragan Simic
0 siblings, 0 replies; 5+ messages in thread
From: Dragan Simic @ 2024-02-06 10:43 UTC (permalink / raw)
To: Quentin Schulz; +Cc: u-boot, sjg, trini, martin
On 2024-02-06 11:41, Quentin Schulz wrote:
> On 2/6/24 11:37, Dragan Simic wrote:
>> On 2024-02-06 11:25, Quentin Schulz wrote:
>>> On 2/6/24 04:56, 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>
>>>> ---
>>>> 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..6d3d7b68fdfa 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>/dev/null ; then
>>>
>>> What about
>>>
>>> which $dtc > /dev/null 2>&1
>>>
>>> instead?
>>
>> That's exactly what I intended to use, but IIRC some shells
>> or some older versions of some shells may not recognize that,
>> so I went with a more verbose, but slightly safer option.
>>
>
> $ git -c core.pager='' grep "2>&1" scripts
> scripts/Kbuild.include: if (which $(strip $(c))$(CC)) > /dev/null 2>&1
> ; then \
> scripts/Kbuild.include: if ($(1)) >/dev/null 2>&1; \
> scripts/Kbuild.include:cc-name = $(shell $(CC) -v 2>&1 | grep -q
> "clang version" && echo clang || echo gcc)
> scripts/Kconfig.include:if-success = $(shell,{ $(1); } >/dev/null 2>&1
> && echo "$(2)" || echo "$(3)")
> scripts/checkpatch.pl: $maintained_status{$filename} = `perl
> $root/scripts/get_maintainer.pl --status --nom --nol --nogit
> --nogit-fallback -f $filename 2>&1`;
> scripts/checkpatch.pl: my $output = `${git_command} log --no-color
> --format='%H %s' -1 $commit 2>&1`;
> scripts/coccicheck:echo $SPFLAGS | grep -Ee "--profile|--show-trying"
> 2>&1 > /dev/null
> scripts/decodecode: ${CROSS_COMPILE}as $AFLAGS -o $1.o $1.s > /dev/null
> 2>&1
> scripts/decodecode: grep -v "/tmp\|Disassembly\|\.text\|^$" > $1.dis
> 2>&1
> scripts/gcc-stack-usage.sh:cat <<END | $@ -Werror -fstack-usage -x c -
> -c -o $TMP >/dev/null 2>&1 \
> scripts/get_maintainer.pl: my $output = `git ls-remote --exit-code -h
> "$url" $branch > /dev/null 2>&1`;
> scripts/get_maintainer.pl: $cmd .= " 2>&1";
> scripts/kernel-doc: open IN, "$cmd --version 2>&1 |";
>
>
> So we're probably fine?
Obviously. :) I'll send the v2.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-06 10:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06 3:56 [PATCH] scripts: dtc-version: Don't show error messages Dragan Simic
2024-02-06 10:25 ` Quentin Schulz
2024-02-06 10:37 ` Dragan Simic
2024-02-06 10:41 ` Quentin Schulz
2024-02-06 10:43 ` Dragan Simic
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.