kmod_module_get_dependency is renamed to kmod_module_get_dependencies
since it's returning a list. To match other APIs, now it returns a new
list that user must free with kmod_module_unref_list().
kmod_loaded_get_list() now returns a regular list of kmod_modules, use
kmod_module_get_module(), kmod_module_unref() and
kmod_module_unref_list() to operate on it.
provide means to get:
* refcount
* initstate
* holders
* sections
this can be used to individually query properties from modules,
similar to /proc/modules (kmod_loaded / kmod_loaded_module).
We return a kmod_list when searching for an alias. Right now, it only
search for aliases in config files.
To use it, we create a list:
list = NULL;
kmod_module_new_from_lookup(..., &list);
And iterate over it to get the modules and their details:
kmod_list_foreach(l, list) {
struct kmod_mod *mod = kmod_module_get_module(l);
...
... kmod_module_get_name(mod);
... kmod_module_get_path(mod);
}
Aliases might contain globs and are match by using fnmatch().