summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/util/find-unused-errs
diff options
context:
space:
mode:
Diffstat (limited to 'deps/openssl/openssl/util/find-unused-errs')
-rwxr-xr-xdeps/openssl/openssl/util/find-unused-errs21
1 files changed, 20 insertions, 1 deletions
diff --git a/deps/openssl/openssl/util/find-unused-errs b/deps/openssl/openssl/util/find-unused-errs
index 68cf66b15f..cd1026d594 100755
--- a/deps/openssl/openssl/util/find-unused-errs
+++ b/deps/openssl/openssl/util/find-unused-errs
@@ -13,8 +13,27 @@
export X1=/tmp/f.1.$$
export X2=/tmp/f.2.$$
+case "$1" in
+ -f)
+ PAT='_F_'
+ echo Functions only
+ ;;
+ -[er])
+ PAT='_R_'
+ echo Reason codes only
+ ;;
+ "")
+ PAT='_[FR]_'
+ echo Function and reasons
+ ;;
+ *)
+ echo "Usage error; one of -[efr] required."
+ exit 1;
+ ;;
+esac
+
cd include/openssl || exit 1
-grep '_[RF]_' * | awk '{print $3;}' | sort -u >$X1
+grep "$PAT" * | grep -v ERR_FATAL_ERROR | awk '{print $3;}' | sort -u >$X1
cd ../..
for F in `cat $X1` ; do