]> git.ipfire.org Git - thirdparty/dracut.git/commit
fix(kernel-modules): use modalias info in get_dev_module()
authorAdrien Thierry <athierry@redhat.com>
Mon, 13 Feb 2023 15:43:32 +0000 (10:43 -0500)
committerAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Wed, 15 Feb 2023 11:59:13 +0000 (12:59 +0100)
commit87a76dbb578aff473e690857d1b714eacd92b9ec
treeb88ae598f4649e3a1f12ba6a500bd863bfccc876
parentc5dca3d68915cef077fda2bc5292e12f82cf6dd6
fix(kernel-modules): use modalias info in get_dev_module()

When calling dracut with '--hostonly-mode=strict', get_dev_module() gets
called on the system's block devices to find the required drivers. The
driver name is retrieved using udevadm. However, the driver name
returned by udevadm is not necessarily the same as the module name.
This is the case for the Qualcomm UFS driver: udevadm returns
'ufshcd-qcom' while the module name is 'ufs-qcom', so dracut-install is
not able to find the module afterwards.

To solve this, make get_dev_module() also return the module alias info
from the modalias files contained in the sysfs directories parsed by
udevadm.

Signed-off-by: Adrien Thierry <athierry@redhat.com>
dracut-functions.sh