summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Lucas De Marchi [Fri, 2 Dec 2011 12:05:31 +0000 (10:05 -0200)]
Fix 'old style declaration' warnings
Lucas De Marchi [Fri, 2 Dec 2011 12:03:34 +0000 (10:03 -0200)]
Fix missing return
Lucas De Marchi [Fri, 2 Dec 2011 12:02:05 +0000 (10:02 -0200)]
Clean 'unused variable' warnings
Lucas De Marchi [Fri, 2 Dec 2011 12:00:03 +0000 (10:00 -0200)]
Clean 'shadowed declaration' warnings
Lucas De Marchi [Fri, 2 Dec 2011 11:56:22 +0000 (09:56 -0200)]
Clean 'shadowed declaration' warnings
index is a function in string.h, so replace index with idx all over the
source code.
Lucas De Marchi [Fri, 2 Dec 2011 11:53:31 +0000 (09:53 -0200)]
Clean 'no previous prototype' warning
Lucas De Marchi [Fri, 2 Dec 2011 01:13:27 +0000 (23:13 -0200)]
Use fstat() instead of stat() when possible
Lucas De Marchi [Thu, 1 Dec 2011 22:06:08 +0000 (20:06 -0200)]
Add fucntion to API to get dependencies
Lucas De Marchi [Thu, 1 Dec 2011 20:59:54 +0000 (18:59 -0200)]
Use strtok_r insteat of strtok
strtok is not thread-safe because it uses a static pointer to keep track
of position in the string. Using strtok_r solves the problem.
Lucas De Marchi [Thu, 1 Dec 2011 20:23:47 +0000 (18:23 -0200)]
Add TODO file with a few items
Lucas De Marchi [Thu, 1 Dec 2011 19:57:07 +0000 (17:57 -0200)]
Add dependencies when module is create by name lookup
We already have the data needed to add the dependencies, so call
fucntion to transform it in a list and save in kmod_module structure.
Lucas De Marchi [Thu, 1 Dec 2011 19:56:03 +0000 (17:56 -0200)]
Add dependency list to kmod_module
Dependency list is created from line as defined in modules.dep.
Lucas De Marchi [Thu, 1 Dec 2011 19:47:49 +0000 (17:47 -0200)]
Add missing newlines
Lucas De Marchi [Thu, 1 Dec 2011 19:18:24 +0000 (17:18 -0200)]
Allow path_to_modname to operate locally withou alloc
Lucas De Marchi [Thu, 1 Dec 2011 18:27:04 +0000 (16:27 -0200)]
Lookup for alias in modules.alias.bin
Lucas De Marchi [Thu, 1 Dec 2011 18:25:37 +0000 (16:25 -0200)]
Generalize function to be used by other lookups
Lucas De Marchi [Thu, 1 Dec 2011 17:57:53 +0000 (15:57 -0200)]
Lookup modules from modules.dep.bin file
Lucas De Marchi [Thu, 1 Dec 2011 17:35:31 +0000 (15:35 -0200)]
Make lookup functions return number of elements found
Lucas De Marchi [Thu, 1 Dec 2011 17:27:42 +0000 (15:27 -0200)]
Add kmod_list_remove_n_latest()
Lucas De Marchi [Thu, 1 Dec 2011 16:47:03 +0000 (14:47 -0200)]
Add kmod_list_prev to exported functions
Lucas De Marchi [Wed, 30 Nov 2011 22:31:45 +0000 (20:31 -0200)]
Lookup modules.symbols.bin
Test in my system:
./test/test-lookup symbol:sas_slave_destroy
libkmod version 0.1
Alias: 'symbol:sas_slave_destroy'
Modules matching:
libsas
Lucas De Marchi [Wed, 30 Nov 2011 22:30:39 +0000 (20:30 -0200)]
Remove dangling comment
Lucas De Marchi [Wed, 30 Nov 2011 22:29:51 +0000 (20:29 -0200)]
Prepare lookup function for more files to look after
Lucas De Marchi [Wed, 30 Nov 2011 22:27:50 +0000 (20:27 -0200)]
Fix initialization of kernel modules dir
Lucas De Marchi [Wed, 30 Nov 2011 21:20:19 +0000 (19:20 -0200)]
Add startswith() helper function
Lucas De Marchi [Wed, 30 Nov 2011 21:10:48 +0000 (19:10 -0200)]
Add test for lookup function
Lucas De Marchi [Wed, 30 Nov 2011 21:03:41 +0000 (19:03 -0200)]
Add lookup to create modules list from alias
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().
Lucas De Marchi [Wed, 30 Nov 2011 21:01:01 +0000 (19:01 -0200)]
Add name() and path() getters for kmod_module
Lucas De Marchi [Wed, 30 Nov 2011 20:57:38 +0000 (18:57 -0200)]
Organize functions in private header
Lucas De Marchi [Wed, 30 Nov 2011 20:18:13 +0000 (18:18 -0200)]
Add getters for aliases
Lucas De Marchi [Wed, 30 Nov 2011 18:01:08 +0000 (16:01 -0200)]
Fix misspellings by use of codespell
Lucas De Marchi [Wed, 30 Nov 2011 17:59:36 +0000 (15:59 -0200)]
Remove trailing whitespaces
Lucas De Marchi [Wed, 30 Nov 2011 17:23:28 +0000 (15:23 -0200)]
Import index handling from module-init-tools
This effectively makes the combined work be GPL. All other parts of this
library are still LGPL and if this part in future becomes
double-licensed, we can switch back to LGPL.
Lucas De Marchi [Wed, 30 Nov 2011 16:36:46 +0000 (14:36 -0200)]
Add streq() to prettify code
It's needed for importing index handling from module-init-tools, and may
be useful for the project, too.
Lucas De Marchi [Wed, 30 Nov 2011 16:35:39 +0000 (14:35 -0200)]
Define temporary macros for importing index
Lucas De Marchi [Wed, 30 Nov 2011 04:14:57 +0000 (02:14 -0200)]
Use underscores() in module names and aliases
Lucas De Marchi [Wed, 30 Nov 2011 04:14:33 +0000 (02:14 -0200)]
Add underscores() helper to replace - with _
Lucas De Marchi [Tue, 29 Nov 2011 20:48:02 +0000 (18:48 -0200)]
Parse blacklists in config files
Lucas De Marchi [Tue, 29 Nov 2011 20:07:43 +0000 (18:07 -0200)]
Add support for parsing config files
Right now only alias keyword is treated.
Lucas De Marchi [Tue, 29 Nov 2011 20:05:43 +0000 (18:05 -0200)]
Add getline_wrapped() to parse config files
Basically copied from module-init-tools
Lucas De Marchi [Tue, 29 Nov 2011 19:59:58 +0000 (17:59 -0200)]
Add macro to safely derive the size of an array
Lucas De Marchi [Mon, 28 Nov 2011 18:58:23 +0000 (16:58 -0200)]
Fix wrong copyright
I'm the author, not the copyright owner.
Lucas De Marchi [Mon, 28 Nov 2011 14:03:17 +0000 (12:03 -0200)]
Move down the ifdef for c++
Lucas De Marchi [Fri, 25 Nov 2011 03:28:39 +0000 (01:28 -0200)]
Back to logging without \n
It possibly breaks when not logging to stderr
Lucas De Marchi [Fri, 25 Nov 2011 03:25:18 +0000 (01:25 -0200)]
Add test-insmod to insert modules
Insmod is supported only with file names yet.
Lucas De Marchi [Fri, 25 Nov 2011 03:24:16 +0000 (01:24 -0200)]
Add test-rmmod2
Remove module without dealing with the loaded modules first.
Lucas De Marchi [Fri, 25 Nov 2011 03:22:56 +0000 (01:22 -0200)]
Add functions to operate on modules
Lucas De Marchi [Fri, 25 Nov 2011 03:21:47 +0000 (01:21 -0200)]
Fix check_PROGRAMS in autofoo
Lucas De Marchi [Fri, 25 Nov 2011 03:07:04 +0000 (01:07 -0200)]
When logging to stderr, put a \n by default
Lucas De Marchi [Fri, 25 Nov 2011 03:05:30 +0000 (01:05 -0200)]
Make log function uppercase
The worst case is the err() macro. Usually err is used as a variable,
which clashes with this macro.
Lucas De Marchi [Fri, 25 Nov 2011 01:31:25 +0000 (23:31 -0200)]
Add cscope.out and .swp files to gitignore
Lucas De Marchi [Thu, 24 Nov 2011 18:41:01 +0000 (16:41 -0200)]
Accept dir where we should lookup for modules
Lucas De Marchi [Thu, 24 Nov 2011 17:42:16 +0000 (15:42 -0200)]
Format enum
Lucas De Marchi [Thu, 24 Nov 2011 17:41:48 +0000 (15:41 -0200)]
Format refcount handling
Lucas De Marchi [Fri, 25 Nov 2011 01:06:48 +0000 (23:06 -0200)]
Ref and unref ctx when kmod_loaded is created/destroyed
Lucas De Marchi [Thu, 24 Nov 2011 17:41:15 +0000 (15:41 -0200)]
Fix refcount of loaded modules
Lucas De Marchi [Thu, 24 Nov 2011 15:29:44 +0000 (13:29 -0200)]
Do not configure if NOCONFIGURE is set
Lucas De Marchi [Thu, 24 Nov 2011 15:29:28 +0000 (13:29 -0200)]
Add more warning flags
Lucas De Marchi [Wed, 23 Nov 2011 19:52:48 +0000 (17:52 -0200)]
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().
Lucas De Marchi [Wed, 23 Nov 2011 19:22:09 +0000 (17:22 -0200)]
Add binary to test rmmod feature
It doesn't run with `make check' since
o It's dangerous
o It needs to be run as root
o It needs an argument, otherwise it removes the first module
with use_count==0
Lucas De Marchi [Wed, 23 Nov 2011 18:10:58 +0000 (16:10 -0200)]
Implement function to remove module
Lucas De Marchi [Wed, 23 Nov 2011 17:24:34 +0000 (15:24 -0200)]
Rename leftover libabc reference
Lucas De Marchi [Wed, 23 Nov 2011 14:23:46 +0000 (12:23 -0200)]
Rename libkmod-util.h to macro.h
Lucas De Marchi [Wed, 23 Nov 2011 14:21:29 +0000 (12:21 -0200)]
Add some function attributes and use them
Lucas De Marchi [Wed, 23 Nov 2011 13:52:30 +0000 (11:52 -0200)]
Constify API
Lucas De Marchi [Wed, 23 Nov 2011 13:50:27 +0000 (11:50 -0200)]
Remove leftover declarations
Lucas De Marchi [Tue, 22 Nov 2011 07:42:09 +0000 (05:42 -0200)]
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.
Lucas De Marchi [Tue, 22 Nov 2011 21:43:21 +0000 (19:43 -0200)]
Update .gitignore
Lucas De Marchi [Tue, 22 Nov 2011 07:38:28 +0000 (05:38 -0200)]
Implement circular double-linked list
Lucas De Marchi [Tue, 22 Nov 2011 19:46:19 +0000 (17:46 -0200)]
Add some good practices to autofoo
Lucas De Marchi [Tue, 22 Nov 2011 16:50:50 +0000 (14:50 -0200)]
Put test back
Lucas De Marchi [Tue, 22 Nov 2011 07:37:21 +0000 (05:37 -0200)]
Don't use glob in version script
Lucas De Marchi [Tue, 22 Nov 2011 07:35:43 +0000 (05:35 -0200)]
Fix version to 0:0:0
Version is only incremented upon release
Lucas De Marchi [Mon, 21 Nov 2011 17:13:19 +0000 (15:13 -0200)]
Remove unused functions
Lucas De Marchi [Mon, 21 Nov 2011 17:07:27 +0000 (15:07 -0200)]
Make kmod_new return a pointer
Lucas De Marchi [Mon, 21 Nov 2011 16:59:23 +0000 (14:59 -0200)]
Convert spaces to tabs
Lucas De Marchi [Mon, 21 Nov 2011 16:35:35 +0000 (14:35 -0200)]
Rename libabc to libkmod
Lucas De Marchi [Mon, 21 Nov 2011 14:35:15 +0000 (12:35 -0200)]
Import skeleton from libabc