Commit Graph

1349 Commits

Author SHA1 Message Date
Lucas De Marchi
b0ef19f7f5 Add getters for aliases 2011-11-30 18:18:13 -02:00
Lucas De Marchi
2043369e7e Fix misspellings by use of codespell 2011-11-30 16:02:08 -02:00
Lucas De Marchi
a7be73b917 Remove trailing whitespaces 2011-11-30 15:59:47 -02:00
Lucas De Marchi
e8847fd2fc 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.
2011-11-30 15:23:49 -02:00
Lucas De Marchi
44a5460fea Add streq() to prettify code
It's needed for importing index handling from module-init-tools, and may
be useful for the project, too.
2011-11-30 14:36:46 -02:00
Lucas De Marchi
a507d803b4 Define temporary macros for importing index 2011-11-30 14:35:39 -02:00
Lucas De Marchi
30be7513c0 Use underscores() in module names and aliases 2011-11-30 02:14:57 -02:00
Lucas De Marchi
8185fc91e2 Add underscores() helper to replace - with _ 2011-11-30 02:14:33 -02:00
Lucas De Marchi
81cf2060e0 Parse blacklists in config files 2011-11-29 18:48:02 -02:00
Lucas De Marchi
7c2ab358fd Add support for parsing config files
Right now only alias keyword is treated.
2011-11-29 18:07:43 -02:00
Lucas De Marchi
4462c4ac60 Add getline_wrapped() to parse config files
Basically copied from module-init-tools
2011-11-29 18:05:43 -02:00
Lucas De Marchi
aa1c3521de Add macro to safely derive the size of an array 2011-11-29 17:59:58 -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
2bd6299d2b Move down the ifdef for c++ 2011-11-28 12:03:17 -02:00
Lucas De Marchi
1b2e26a1e2 Back to logging without \n
It possibly breaks when not logging to stderr
2011-11-28 11:28:18 -02:00
Lucas De Marchi
a5494f831f Add test-insmod to insert modules
Insmod is supported only with file names yet.
2011-11-25 01:25:18 -02:00
Lucas De Marchi
b84a206085 Add test-rmmod2
Remove module without dealing with the loaded modules first.
2011-11-25 01:24:16 -02:00
Lucas De Marchi
8f788d58c3 Add functions to operate on modules 2011-11-25 01:22:56 -02:00
Lucas De Marchi
46cfa8dc45 Fix check_PROGRAMS in autofoo 2011-11-25 01:21:47 -02:00
Lucas De Marchi
9df4bda566 When logging to stderr, put a \n by default 2011-11-25 01:07:04 -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
8f5d86fd08 Add cscope.out and .swp files to gitignore 2011-11-25 00:32:28 -02:00
Lucas De Marchi
221631d511 Accept dir where we should lookup for modules 2011-11-24 23:20:42 -02:00
Lucas De Marchi
423f856ad9 Format enum 2011-11-24 23:09:40 -02:00
Lucas De Marchi
4d1e689ada Format refcount handling 2011-11-24 23:09:39 -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
c931d00bf0 Do not configure if NOCONFIGURE is set 2011-11-24 13:29:44 -02:00
Lucas De Marchi
e7d903696a Add more warning flags 2011-11-24 13:29:28 -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
eee1345cf2 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
2011-11-23 17:22:09 -02:00
Lucas De Marchi
6806a0437f Implement function to remove module 2011-11-23 17:14:22 -02:00
Lucas De Marchi
6ad9830731 Rename leftover libabc reference 2011-11-23 16:08:04 -02:00
Lucas De Marchi
88e9c12e4e Rename libkmod-util.h to macro.h 2011-11-23 16:08:04 -02:00
Lucas De Marchi
f87081b4d1 Add some function attributes and use them 2011-11-23 16:08:04 -02:00
Lucas De Marchi
6d177553dc Constify API 2011-11-23 12:28:23 -02:00
Lucas De Marchi
8b69b37629 Remove leftover declarations 2011-11-23 11:50:27 -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
Lucas De Marchi
a48d9bdff6 Update .gitignore 2011-11-23 05:15:21 -02:00
Lucas De Marchi
6924e47a8d Implement circular double-linked list 2011-11-23 05:15:21 -02:00
Lucas De Marchi
648a842bfd Add some good practices to autofoo 2011-11-22 17:47:52 -02:00
Lucas De Marchi
be0e323604 Put test back 2011-11-22 17:47:52 -02:00
Lucas De Marchi
68b0d8e507 Don't use glob in version script 2011-11-22 05:37:21 -02:00
Lucas De Marchi
c83a45ea87 Fix version to 0:0:0
Version is only incremented upon release
2011-11-22 05:36:50 -02:00
Lucas De Marchi
9d77b96c7a Remove unused functions 2011-11-21 15:15:54 -02:00
Lucas De Marchi
52a7704f67 Make kmod_new return a pointer 2011-11-21 15:15:54 -02:00
Lucas De Marchi
e4351b053f Convert spaces to tabs 2011-11-21 15:15:54 -02:00
Lucas De Marchi
586fc304d8 Rename libabc to libkmod 2011-11-21 14:35:35 -02:00
Lucas De Marchi
ecd40ee499 Import skeleton from libabc 2011-11-21 12:35:15 -02:00