mirror of
https://github.com/AuxXxilium/kmod.git
synced 2025-01-19 18:36:55 +07:00
Add fucntion to API to get dependencies
This commit is contained in:
parent
c11e62bfd4
commit
0835fc3bf9
5
TODO
5
TODO
@ -23,3 +23,8 @@ Features:
|
||||
* when preloading stuff, give the possibility to preload binary files. We need
|
||||
to create alternative index_search* functions to operate on mmapped files.
|
||||
Then on ctx creation we mmap all the files
|
||||
|
||||
* kmod_module: calculate fields on demand if not available:
|
||||
- name
|
||||
- path
|
||||
- dependency
|
||||
|
@ -259,6 +259,15 @@ KMOD_EXPORT int kmod_module_unref_list(struct kmod_list *list)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't increase the refcount. Maybe we should.
|
||||
*/
|
||||
KMOD_EXPORT struct kmod_list *kmod_module_get_dependency(struct kmod_module *mod)
|
||||
{
|
||||
// FIXME calculate dependency if it's not initialized
|
||||
return mod->dep;
|
||||
}
|
||||
|
||||
KMOD_EXPORT struct kmod_module *kmod_module_get_module(struct kmod_list *l)
|
||||
{
|
||||
struct kmod_module *mod = l->data;
|
||||
|
@ -109,6 +109,7 @@ struct kmod_module *kmod_module_ref(struct kmod_module *mod);
|
||||
struct kmod_module *kmod_module_unref(struct kmod_module *mod);
|
||||
int kmod_module_unref_list(struct kmod_list *list);
|
||||
struct kmod_module *kmod_module_get_module(struct kmod_list *l);
|
||||
struct kmod_list *kmod_module_get_dependency(struct kmod_module *mod);
|
||||
|
||||
int kmod_module_remove_module(struct kmod_module *mod, unsigned int flags);
|
||||
int kmod_module_insert_module(struct kmod_module *mod, unsigned int flags);
|
||||
|
@ -27,6 +27,7 @@ global:
|
||||
kmod_module_remove_module;
|
||||
kmod_module_insert_module;
|
||||
|
||||
kmod_module_get_dependency;
|
||||
kmod_module_get_module;
|
||||
|
||||
kmod_module_get_name;
|
||||
|
Loading…
Reference in New Issue
Block a user