[yocto] [kernel-tools][PATCH] scc: Fix process_file error check
George McCollister
george.mccollister at gmail.com
Fri Jan 13 12:27:20 PST 2017
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 at 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
More information about the yocto
mailing list