32 lines
627 B
Bash
32 lines
627 B
Bash
#! /bin/sh
|
|
|
|
IFS=$'\n'
|
|
filelist=($(cat))
|
|
|
|
printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-provides "$@"
|
|
|
|
sourcedir=${0%/*}
|
|
flavor=${1##*-}
|
|
|
|
tmpdir=$(mktemp -dt ${0##*/}.XXXXXXXXXX)
|
|
trap "rm -rf $tmpdir" EXIT
|
|
|
|
for file in "${filelist[@]}"; do
|
|
case "$file" in
|
|
*/boot/symvers-*.gz)
|
|
zcat "$file" \
|
|
| awk '$3 == "vmlinux" || $3 ~ /\/built-in$/ { print }'
|
|
;;
|
|
*.ko)
|
|
$sourcedir/list-exported-symbols $file
|
|
;;
|
|
esac
|
|
done \
|
|
| $sourcedir/split-into-symsets $tmpdir
|
|
|
|
shopt -s nullglob
|
|
for symset in $tmpdir/*; do
|
|
class=${symset##*/} ; class=${class%.*}
|
|
echo "kernel($flavor:$class) = ${symset##*.}"
|
|
done
|