* [PATCH] scripts/dtc: dtx_diff, before grep check .config file exists
@ 2016-07-19 8:33 Gaurav Minocha
[not found] ` <1468917183-6801-1-git-send-email-gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Gaurav Minocha @ 2016-07-19 8:33 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, Gaurav Minocha
scripts/dtc/dtx_diff searches CONFIG_DTC=y in .config,
but it doesn't checks whether the file exists or not.
So, this patch adds a check for .config file.
Tested script with and without .config file.
>/scripts/dtc/dtx_diff test.dts
Signed-off-by: Gaurav Minocha <gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
scripts/dtc/dtx_diff | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/dtc/dtx_diff b/scripts/dtc/dtx_diff
index 959ab26..1c76dcd 100755
--- a/scripts/dtc/dtx_diff
+++ b/scripts/dtc/dtx_diff
@@ -266,7 +266,8 @@ DTC="${__KBUILD_OUTPUT}/scripts/dtc/dtc"
if [ ! -x ${DTC} ] ; then
__DTC="dtc"
- if grep -q "^CONFIG_DTC=y" ${__KBUILD_OUTPUT}/.config ; then
+ if [ -f "${__KBUILD_OUTPUT}/.config" ] && \
+ grep -q "^CONFIG_DTC=y" ${__KBUILD_OUTPUT}/.config ; then
make_command='
make scripts'
else
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scripts/dtc: dtx_diff, before grep check .config file exists
[not found] ` <1468917183-6801-1-git-send-email-gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-07-19 12:07 ` Frank Rowand
0 siblings, 0 replies; 4+ messages in thread
From: Frank Rowand @ 2016-07-19 12:07 UTC (permalink / raw)
To: Gaurav Minocha, devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A
On 07/19/16 01:33, Gaurav Minocha wrote:
> scripts/dtc/dtx_diff searches CONFIG_DTC=y in .config,
> but it doesn't checks whether the file exists or not.
>
> So, this patch adds a check for .config file.
>
> Tested script with and without .config file.
>
>> /scripts/dtc/dtx_diff test.dts
>
> Signed-off-by: Gaurav Minocha <gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> scripts/dtc/dtx_diff | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/dtc/dtx_diff b/scripts/dtc/dtx_diff
> index 959ab26..1c76dcd 100755
> --- a/scripts/dtc/dtx_diff
> +++ b/scripts/dtc/dtx_diff
> @@ -266,7 +266,8 @@ DTC="${__KBUILD_OUTPUT}/scripts/dtc/dtc"
>
> if [ ! -x ${DTC} ] ; then
> __DTC="dtc"
> - if grep -q "^CONFIG_DTC=y" ${__KBUILD_OUTPUT}/.config ; then
> + if [ -f "${__KBUILD_OUTPUT}/.config" ] && \
> + grep -q "^CONFIG_DTC=y" ${__KBUILD_OUTPUT}/.config ; then
> make_command='
> make scripts'
> else
>
Hi Gaurav,
Thanks for chasing that down.
Instead of checking for the existance of .config, can you just redirect
stderr from the grep to /dev/null and make sure that works?
You can add my acked-by if that passes your testing.
Thanks,
Frank
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] scripts/dtc: dtx_diff, before grep check .config file exists
@ 2016-07-19 15:42 Gaurav Minocha
[not found] ` <1468942925-5025-1-git-send-email-gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Gaurav Minocha @ 2016-07-19 15:42 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, Gaurav Minocha
scripts/dtc/dtx_diff searches CONFIG_DTC=y in .config,
but it doesn't checks whether the file exists or not.
So, this patch adds a check for .config file.
Tested script with and without .config file.
>/scripts/dtc/dtx_diff test.dts
Signed-off-by: Gaurav Minocha <gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Acked-by: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
scripts/dtc/dtx_diff | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/dtc/dtx_diff b/scripts/dtc/dtx_diff
index 959ab26..ec47f95 100755
--- a/scripts/dtc/dtx_diff
+++ b/scripts/dtc/dtx_diff
@@ -266,7 +266,7 @@ DTC="${__KBUILD_OUTPUT}/scripts/dtc/dtc"
if [ ! -x ${DTC} ] ; then
__DTC="dtc"
- if grep -q "^CONFIG_DTC=y" ${__KBUILD_OUTPUT}/.config ; then
+ if grep -q "^CONFIG_DTC=y" ${__KBUILD_OUTPUT}/.config 2>/dev/null; then
make_command='
make scripts'
else
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scripts/dtc: dtx_diff, before grep check .config file exists
[not found] ` <1468942925-5025-1-git-send-email-gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-07-19 15:55 ` Gaurav Minocha
0 siblings, 0 replies; 4+ messages in thread
From: Gaurav Minocha @ 2016-07-19 15:55 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Frank Rowand, Rob Herring, Gaurav Minocha
Please ignore this patch, forgot to update the commit message and subject
On Tue, Jul 19, 2016 at 8:42 AM, Gaurav Minocha
<gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> scripts/dtc/dtx_diff searches CONFIG_DTC=y in .config,
> but it doesn't checks whether the file exists or not.
>
> So, this patch adds a check for .config file.
>
> Tested script with and without .config file.
>
>>/scripts/dtc/dtx_diff test.dts
>
> Signed-off-by: Gaurav Minocha <gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Acked-by: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> scripts/dtc/dtx_diff | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/dtc/dtx_diff b/scripts/dtc/dtx_diff
> index 959ab26..ec47f95 100755
> --- a/scripts/dtc/dtx_diff
> +++ b/scripts/dtc/dtx_diff
> @@ -266,7 +266,7 @@ DTC="${__KBUILD_OUTPUT}/scripts/dtc/dtc"
>
> if [ ! -x ${DTC} ] ; then
> __DTC="dtc"
> - if grep -q "^CONFIG_DTC=y" ${__KBUILD_OUTPUT}/.config ; then
> + if grep -q "^CONFIG_DTC=y" ${__KBUILD_OUTPUT}/.config 2>/dev/null; then
> make_command='
> make scripts'
> else
> --
> 2.1.4
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-19 15:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-19 8:33 [PATCH] scripts/dtc: dtx_diff, before grep check .config file exists Gaurav Minocha
[not found] ` <1468917183-6801-1-git-send-email-gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-19 12:07 ` Frank Rowand
-- strict thread matches above, loose matches on Subject: below --
2016-07-19 15:42 Gaurav Minocha
[not found] ` <1468942925-5025-1-git-send-email-gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-19 15:55 ` Gaurav Minocha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).