On Wednesday 03 May 2017 08:42 AM, Xunlei Pang wrote:
> `modinfo -F filename` is special and lists the filename of the
module. So, for any of the alias it will point to real file name, which can be looked in
00-watchdog.conf. Therefore, probably we can avoid the following loop.
I am afraid not, in case of <alias> mapped to multiple drivers, "modinfo -F
filename <alias>" will result in multiple filename lines, just like
"modprobe -R <alias>".
Hummmmm...man modinfo seems confusing..but then it could be tricky..
Can we have the possibility like following?
modalias of watchdog0 is m0 and associated modules names are a1, a2 and a3
modalias of watchdog1 is m1 and associated modules names are a1, a4 and a5
If there is a possibility of above scenario then we will need to check for all
the modules. In that case current patch could be equally efficient.
~Pratyush
> For example:
> $ modinfo -F filename char-major-10-130
> /lib/modules/3.10.0-636.el7.x86_64/kernel/drivers/watchdog/pcwd_pci.ko.xz
> /lib/modules/3.10.0-636.el7.x86_64/kernel/drivers/watchdog/wdt_pci.ko.xz
> /lib/modules/3.10.0-636.el7.x86_64/kernel/drivers/watchdog/pcwd_usb.ko.xz
> /lib/modules/3.10.0-636.el7.x86_64/kernel/drivers/watchdog/alim1535_wdt.ko.xz