]> git.ipfire.org Git - thirdparty/dracut.git/commit
dracut-install: fix relative paths in --kerneldir 284/head
authorArtem Savkov <asavkov@redhat.com>
Thu, 21 Sep 2017 08:36:58 +0000 (10:36 +0200)
committerArtem Savkov <asavkov@redhat.com>
Thu, 21 Sep 2017 09:27:23 +0000 (11:27 +0200)
commitef84ce2521a5b0463d9e8c9ced101d03cec4937c
treef5474500f01f622e0b73e8eb3fc5e4e6fc3baa03
parent424c065cd99cc9c35a92a68d34c161beff5f5497
dracut-install: fix relative paths in --kerneldir

kerneldirlen is used to modify absolute path returned by
kmod_module_get_path() while it is calculated on user-supplied
--kerneldir argument which can be a relative path.

Use kmod_get_dirname() to convert user-supplied path to the same format
as used by kmod_module_get_path().

This also allows to get rid of now useless strcmp checks that seem to
imply that /lib and /usr/lib are linked which is not always true.
install/dracut-install.c