check_format: Ignore rte_vhost code in forbidden function check

Also print out line numbers.

Change-Id: I1beb363795d7c8b0d04cb501a2e7169b313134a0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/407495
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Ben Walker 2018-04-12 11:01:05 -07:00 committed by Daniel Verkamp
parent 931b7d1f85
commit e450a34aa9

View File

@ -77,8 +77,7 @@ rm -f whitespace.log
echo -n "Checking for use of forbidden library functions..." echo -n "Checking for use of forbidden library functions..."
git grep -w '\(strcpy\|sprintf\|vsprintf\)' -- app examples lib test > badfunc.log || true git grep --line-number -w '\(strcpy\|sprintf\|vsprintf\)' -- './*.c' ':!lib/vhost/rte_vhost*/**' > badfunc.log || true
if [ -s badfunc.log ]; then if [ -s badfunc.log ]; then
echo " Forbidden library functions detected" echo " Forbidden library functions detected"
cat badfunc.log cat badfunc.log