1 #!/bin/sh 2 3 # Find definition usage in the available sources. 4 5 E2FSPROGS=$1 6 7 # Find definition names. 8 9 for DEF in `grep '#define' "$E2FSPROGS/lib/config.h" | sed 's/#define //;s/ .*$//' | grep -e '^[A-Z_]'` ; do 10 11 # Look for use of each definition in the libext2fs sources, filtering out 12 # definitions that are not used. 13 14 if find "$E2FSPROGS/lib" -mindepth 2 -name '*.[ch]' | xargs grep -q -e "$DEF" ; then 15 grep "#define $DEF" "$E2FSPROGS/lib/config.h" 16 fi 17 done 18 19 # vim: tabstop=4 expandtab shiftwidth=4