]> git.ipfire.org Git - thirdparty/kmod.git/commit
Add private function kmod_module_new_from_alias()
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 13 Dec 2011 16:12:50 +0000 (14:12 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 13 Dec 2011 16:12:50 +0000 (14:12 -0200)
commit6ad5f2636249bc1ceeab81325284686815aa7fbe
treec4d908e4f058fd265d6b71a48fc6046e59d3e917
parent219f9c38bb283f6173ed37d1eb54671e1ca52349
Add private function kmod_module_new_from_alias()

This function will create a new kmod_module() by calling
kmod_module_new_from_name(), but instead of given the module name, it
gives the alias. This way, the modules' hash will contain the alias
instead of the name. If module was created successfully, then it swap
the alias with the actual name.

The downside is that the structure is not shared anymore if we create a
kmod_module by alias and after by name. However, in modprobe's
configuration it's possible to have different options for different
aliases. In future we might want to create a way to share the common
part of the structure (then having only one instance as we had before).
libkmod/libkmod-module.c
libkmod/libkmod-private.h