]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
find-api-violations: fix a broken grep pattern
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 4 Jan 2018 19:59:53 +0000 (13:59 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 4 Jan 2018 19:59:53 +0000 (13:59 -0600)
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 <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
tools/find-api-violations.sh

index c2be4c564742e8f1591c7b7ebb049f92edb335db..3b976d3880ea3670b6039b3daaf94b2af4022f19 100755 (executable)
@@ -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() {