Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
build-kheaders: Fix redirection of error messages
Browse files Browse the repository at this point in the history
When the kernel source was not built in-tree, the script was failing
silently. This patch exposes the error to the user.
  • Loading branch information
ErickReyesR committed Apr 4, 2018
1 parent e573e6c commit 34863fe
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bcc/build-kheaders-targz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ find include >> /tmp/kernel-headers.h
grep "include/generated/autoconf.h" /tmp/kernel-headers.h > /dev/null 2>&1
retgrep=$?
if [ $retgrep -ne 0 ]; then
echo ""
echo "The kernel sources at ${KERNEL_PATH} you pointed to aren't configured and built."
echo "Please atleast run in your kernel sources:"
echo $'make defconfig\nmake'
echo $'\nNote: You dont need to do the full build since headers are generated early on.\n'
>&2 echo ""
>&2 echo "The kernel sources at ${KERNEL_PATH} you pointed to aren't configured and built."
>&2 echo "Please atleast run in your kernel sources:"
>&2 echo $'make defconfig\nmake'
>&2 echo $'\nNote: You dont need to do the full build since headers are generated early on.\n'
>&2 echo "Note: Please build your kernel in tree (build and source should be in same directory)"
>&2 echo ""
exit $retgrep
fi

Expand Down

0 comments on commit 34863fe

Please sign in to comment.