From: Darrick J. Wong Date: Thu, 4 Jan 2018 19:59:53 +0000 (-0600) Subject: find-api-violations: fix a broken grep pattern X-Git-Tag: v4.15.0-rc1~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=128491c39f86fe0eb6ff7e99e3d1241a9555e865;p=thirdparty%2Fxfsprogs-dev.git find-api-violations: fix a broken grep pattern One of the grep patterns in find-api-violations is mistaken for a (broken) range specifier when LC_ALL=C, so fix it to work properly. This was found by wiring up the script to xfstests. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- diff --git a/tools/find-api-violations.sh b/tools/find-api-violations.sh index c2be4c564..3b976d388 100755 --- a/tools/find-api-violations.sh +++ b/tools/find-api-violations.sh @@ -10,7 +10,7 @@ tool_dirs="copy db estimate fsck fsr growfs io logprint mdrestore mkfs quota rep # Calls to xfs_* functions in libxfs/*.c without the libxfs_ prefix find_possible_api_calls() { - grep -rn '[[:space:],-(]xfs_[a-z_]*(' $tool_dirs | sed -e 's/^.*\(xfs_[a-z_]*\)(.*$/\1/g' | sort | uniq + grep -rn '[-[:space:],(]xfs_[a-z_]*(' $tool_dirs | sed -e 's/^.*\(xfs_[a-z_]*\)(.*$/\1/g' | sort | uniq } check_if_api_calls() {