[PATCH 5/5] find-api-violations: fix a broken grep pattern
From: Darrick J. Wong <hidden>
Date: 2018-01-03 18:40:42
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Darrick J. Wong <hidden>
Date: 2018-01-03 18:40:42
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Darrick J. Wong <redacted> 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 <redacted> --- tools/find-api-violations.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/find-api-violations.sh b/tools/find-api-violations.sh
index c2be4c5..3b976d3 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() {