Commit Graph

13 Commits

Author SHA1 Message Date
Lucas De Marchi
8fc83fe1de kmod_loaded: document exported function 2011-12-08 12:59:16 -02:00
Gustavo Sverzut Barbieri
69f9dd4369 no more kmod_loaded and kmod_loaded_module.
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.
2011-12-04 17:24:08 -02:00
Gustavo Sverzut Barbieri
8d3f3ef815 reorder struct fields to avoid holes, improving packing 2011-12-03 03:56:02 -02:00
Gustavo Sverzut Barbieri
12d9419d08 improve compiler warnings and checks for internal functions. 2011-12-03 03:52:35 -02:00
Gustavo Sverzut Barbieri
1ce08a563e improve "const" keyword usage.
functions that do not modify their parameters get them as const pointers.

special cases:
 * kmod_get_userdata/kmod_set_userdata: return as void* for user convenience.
 * kmod_list_append/kmod_list_prepend: take const void* for user convenience.
2011-12-03 03:51:55 -02:00
Lucas De Marchi
191ab4b9e0 Fix wrong copyright
I'm the author, not the copyright owner.
2011-11-28 16:59:06 -02:00
Lucas De Marchi
ae6df84a3c Make log function uppercase
The worst case is the err() macro. Usually err is used as a variable,
which clashes with this macro.
2011-11-25 01:05:30 -02:00
Lucas De Marchi
853b5fc52e Ref and unref ctx when kmod_loaded is created/destroyed 2011-11-24 23:09:39 -02:00
Lucas De Marchi
cf9aadeb25 Fix refcount of loaded modules 2011-11-24 15:41:15 -02:00
Lucas De Marchi
6fc20bbfee Keep valgrind happy when mixing sscanf and strtok
When mixing sscanf() and strtok() Valgrind complaints like below:

==1641== Conditional jump or move depends on uninitialised value(s)

Use stroull() instead of sscanf().
2011-11-23 17:52:48 -02:00
Lucas De Marchi
6806a0437f Implement function to remove module 2011-11-23 17:14:22 -02:00
Lucas De Marchi
6d177553dc Constify API 2011-11-23 12:28:23 -02:00
Lucas De Marchi
5369797d09 Add libkmod-loaded to handle live modules information
All the functions needed by a lsmod binary are in place.
test/test-loaded.c implements it with the same output of lsmod.
2011-11-23 11:44:17 -02:00