mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 18:32:13 +02:00
ADT: Fix check_result script cond comparison bug
When meeting errors, the return number can't be directly compared with -1. Actually, it might be represented as 255. The correct way is to compared it with 0. If the result is non-zero number, we meet error. This patch is for fixing [BUGID #742] Signed-off-by: Liping Ke <liping.ke@intel.coom>
This commit is contained in:
committed by
Richard Purdie
parent
6148562de2
commit
7537f44a49
@@ -84,14 +84,14 @@ done
|
||||
|
||||
check_result()
|
||||
{
|
||||
result="$?"
|
||||
if [ "$result" == "-1" ]; then
|
||||
result=$?
|
||||
if [ $result -eq 1 ]; then
|
||||
exit -1
|
||||
elif [ $result -ne 0 ]; then
|
||||
echo_info "\n#############################################################################"
|
||||
echo_info "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
|
||||
echo_info "#############################################################################\n"
|
||||
exit -1
|
||||
elif [ "$result" == "1" ]; then
|
||||
exit -1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user