How to identify the module supposed to claim a device by vendor/product ID only?
Solution 1:
If you restate the problem as "How can I run modinfo
on all (or some) modules and select some of the output for further use?", you could use this trick (I've left the commands I used to figure out how to get to the final result):
ls /lib/modules
ls /lib/modules/$(uname -r)
ls /lib/modules/$(uname -r)/kernel
find /lib/modules/$(uname -r)/kernel -type f -name '*.ko' -print
for i in $( !! ) ; do
for i in $( find /lib/modules/$(uname -r)/kernel -type f -name '*.ko' -print ) ; do
j=${i##.*/}
j=${j%%.ko}
echo $j
modinfo $i | egrep 'filename:|alias:'
echo ""
done
This trick can be used elsewhere, have fun!