Skip to content

Commit be050d7

Browse files
committed
libtraceevent: Add check for duplicate functions in man pages
Update the check-manpages.sh script to make sure that there are no functions that are described in more than one man page. The output will look like this: Found tep_find_function in libtraceevent-func_find.txt and in libtraceevent-func_apis.txt Found tep_find_function_address in libtraceevent-func_find.txt and in libtraceevent-func_apis.txt Link: https://lore.kernel.org/linux-trace-devel/[email protected]/ Link: https://lore.kernel.org/linux-trace-devel/[email protected] Reported-by: Daniel Wagner <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 414028d commit be050d7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

check-manpages.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,19 @@ cd $1
1515
MAIN=libtraceevent
1616
MAIN_FILE=${MAIN}.txt
1717

18+
PROCESSED=""
19+
1820
# Ignore man pages that do not contain functions
1921
IGNORE=""
2022

2123
for man in ${MAIN}-*.txt; do
2224

23-
sed -ne '/^NAME/,/^SYNOP/{/^[a-z]/{s/, *$//;s/,/\n/g;s/ //g;s/-.*$/-/;/-/{s/-//p;q};p}}' $man | while read a; do
25+
for a in `sed -ne '/^NAME/,/^SYNOP/{/^[a-z]/{s/, *$//;s/,/\n/g;s/ //g;s/-.*$/-/;/-/{s/-//p;q};p}}' $man`; do
26+
if [ "${PROCESSED/:${a} /}" != "${PROCESSED}" ]; then
27+
P="${PROCESSED/:${a} */}"
28+
echo "Found ${a} in ${man} and in ${P/* /}"
29+
fi
30+
PROCESSED="${man}:${a} ${PROCESSED}"
2431
if [ "${IGNORE/$man/}" != "${IGNORE}" ]; then
2532
continue
2633
fi

0 commit comments

Comments
 (0)