* [kernel-tools][PATCH] scc: Fix process_file error check
@ 2017-01-13 20:27 George McCollister
2017-01-13 20:33 ` Bruce Ashfield
0 siblings, 1 reply; 2+ messages in thread
From: George McCollister @ 2017-01-13 20:27 UTC (permalink / raw)
To: yocto
Commit 626ceac135fa66277c2fa53197be33cc9d4d7614 broke the error check in
process_file by adding in three lines that stomp on $? which print the
output file when verbose is set.
Move output file on verbose print to an elif after the error check.
Signed-off-by: George McCollister <george.mccollister@gmail.com>
---
tools/scc | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/scc b/tools/scc
index 4cd68a4..3d17496 100755
--- a/tools/scc
+++ b/tools/scc
@@ -246,10 +246,6 @@ process_file()
)
)
- if [ -n "${verbose}" ]; then
- cat ${scc_output_file}
- fi
-
if [ $? -ne 0 ]; then
echo "[ERROR]: processing of file $in failed"
cat ${scc_output_file}
@@ -275,6 +271,8 @@ process_file()
fi
rm -f ${scc_output_file}
exit 1
+ elif [ -n "${verbose}" ]; then
+ cat ${scc_output_file}
fi
rm -f ${scc_output_file}
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [kernel-tools][PATCH] scc: Fix process_file error check
2017-01-13 20:27 [kernel-tools][PATCH] scc: Fix process_file error check George McCollister
@ 2017-01-13 20:33 ` Bruce Ashfield
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2017-01-13 20:33 UTC (permalink / raw)
To: George McCollister, yocto
On 2017-01-13 3:27 PM, George McCollister wrote:
> Commit 626ceac135fa66277c2fa53197be33cc9d4d7614 broke the error check in
> process_file by adding in three lines that stomp on $? which print the
> output file when verbose is set.
>
> Move output file on verbose print to an elif after the error check.
Good catch!
Merged.
My oe-core submissions are queued up at the moment, but I'll have this
in my next batch.
Bruce
>
> Signed-off-by: George McCollister <george.mccollister@gmail.com>
> ---
> tools/scc | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/tools/scc b/tools/scc
> index 4cd68a4..3d17496 100755
> --- a/tools/scc
> +++ b/tools/scc
> @@ -246,10 +246,6 @@ process_file()
> )
> )
>
> - if [ -n "${verbose}" ]; then
> - cat ${scc_output_file}
> - fi
> -
> if [ $? -ne 0 ]; then
> echo "[ERROR]: processing of file $in failed"
> cat ${scc_output_file}
> @@ -275,6 +271,8 @@ process_file()
> fi
> rm -f ${scc_output_file}
> exit 1
> + elif [ -n "${verbose}" ]; then
> + cat ${scc_output_file}
> fi
>
> rm -f ${scc_output_file}
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-13 20:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-13 20:27 [kernel-tools][PATCH] scc: Fix process_file error check George McCollister
2017-01-13 20:33 ` Bruce Ashfield
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.