Commit Graph

517 Commits

Author SHA1 Message Date
Thierry Vignaud
eff917c0d2 WEXITSTATUS is defined in sys/wait.h
Fix compiling with dietlibc:

../libkmod/libkmod-module.c:858:2: warning: implicit declaration of function 'WEXITSTATUS' [-Wimplicit-function-declaration]
../libkmod/libkmod-module.c:858:2: warning: nested extern declaration of 'WEXITSTATUS' [-Wnested-externs]
(...)
kmod-modprobe.c:(.text.command_do+0x157): undefined reference to `WEXITSTATUS'
2012-01-17 17:33:07 -02:00
Lucas De Marchi
6068aaaea8 Check if struct stat has mtim member
Not all libc's have a mtim member in struct stat (dietlibc doesn't).
Change ts_usec() to receive a struct stat as parameter and implement it
accordingly for both cases.
2012-01-17 12:22:55 -02:00
Lucas De Marchi
09e9ae58b6 modprobe: flush stdout before dumping indexes
Index dump doesn't use stdio.h function and instead call write()
directly on STDOUT_FILENO file descriptor. Therefore we need to flush
stdio buffers before calling it, to be sure the configuration dump will
appear before index's.
2012-01-17 10:11:03 -02:00
Lucas De Marchi
b8542a82b7 Fix common misspelling with codespell
-------8<-------
SUMMARY:
ommitted      1
2012-01-16 23:03:33 -02:00
Miklos Vajna
9be0162f9b man: spelling fixes 2012-01-16 23:01:36 -02:00
Lucas De Marchi
b53b7e3282 kmod 4 2012-01-16 16:53:04 -02:00
Lucas De Marchi
f4647b6329 build-sys: add release helpers 2012-01-16 16:52:25 -02:00
Lucas De Marchi
0224482e62 Add doc to kmod_dump_index 2012-01-16 16:44:25 -02:00
Lucas De Marchi
49a163759d modprobe: dump indexes as well 2012-01-16 16:05:47 -02:00
Lucas De Marchi
758428a75f libkmod: dump index files
Provide a function to dump the index files to a certain fd. It could be
more optimized (particularly the functions to dump the index that were
copied and pasted from m-i-t), but it seems like the only user of it is
'modprobe -c', used for debugging purposes. So, keep it as is.
2012-01-16 16:05:46 -02:00
Lucas De Marchi
f1cbf3cfe2 libkmod-util: add helper function to write to fd 2012-01-16 16:05:46 -02:00
Lucas De Marchi
7a973b0cb0 libkmod-util: adhere to coding style 2012-01-16 16:05:46 -02:00
Lucas De Marchi
b08314f7b7 libkmod: export enum kmod_index and rename members 2012-01-16 16:05:36 -02:00
Lucas De Marchi
63be91cbd5 libkmod: store prefix of each index
Prefix is useful when dumping the index (to be added later).
2012-01-16 16:04:32 -02:00
Lucas De Marchi
2f47c7fae9 Update documentation with recent changes 2012-01-14 12:16:48 -02:00
Lucas De Marchi
e15a56af85 depmod: deal with relative root dir
module paths coming from libkmod are absolute. Make sure we store the
absolute dirname to compare later.
2012-01-14 02:46:58 -02:00
Lucas De Marchi
2e092e19a7 kmod_new(): deal with relative paths for dirname 2012-01-14 02:32:25 -02:00
Lucas De Marchi
33557e8d69 depmod: fix idx calculation after postponed array creation
We need to set up each module's idx when the array is created. So,
postpone its initialization as well.
2012-01-14 02:07:14 -02:00
Lucas De Marchi
31f1d0d306 Reduce scope of counter variable 2012-01-14 02:04:31 -02:00
Lucas De Marchi
f6b838e1ba depmod: adhere to coding style 2012-01-14 02:03:21 -02:00
Lucas De Marchi
bc43496a87 modprobe: dump configuration 2012-01-13 11:12:41 -02:00
Lucas De Marchi
6b04ef324a config: let softdeps dump their data 2012-01-13 11:12:41 -02:00
Lucas De Marchi
0017862911 config: add exported iterator functions
Config iterators are useful to get each configuration list, remember its
type and how to get their key/value pair.

softdeps don't have the value yet, because they are stored as string
vectors.
2012-01-13 11:12:41 -02:00
Lucas De Marchi
8b5ee61872 libkmod-private: allow to get aliases from config 2012-01-13 11:12:41 -02:00
Lucas De Marchi
3bf8d4b056 build-sys: add script to bootstrap and configure 2012-01-12 18:33:05 -02:00
Lucas De Marchi
e5603189bc build-sys: rename autogen.sh to bootstrap and keep a symlink 2012-01-12 18:23:32 -02:00
Lucas De Marchi
d89d7cb46a TODO: add code unification to list of tasks 2012-01-12 18:14:32 -02:00
Lucas De Marchi
8b01376742 modprobe: abort on dependency loop that cannot be broken 2012-01-12 17:14:30 -02:00
Lucas De Marchi
e4e1e64ab0 modprobe: fix leak on error path 2012-01-12 15:37:57 -02:00
Lucas De Marchi
e85b6731f9 TODO: update tasks 2012-01-12 15:37:53 -02:00
Lucas De Marchi
a872bba22d modprobe: rework module removal without tree traversing
Just like the module insertion, module removal is remade.

The dependencies line that comes from modules.dep already contains all
the dependencies necessary to remove that module. Therefore modprobe
doesn't have to do the recursion between the modules in order to remove
it. All we have to do is to remove in order:

For the module being removed:
----------------------------

1. softdeps (in reverse order)
2. deps (in reverse order)
3. module
4. postdeps (in reverse order)

For any of the dependencies:
----------------------------

1. softdeps (in reverse order)
2. module
3. softdeps (in reverse order)
2012-01-12 15:23:51 -02:00
Lucas De Marchi
f564394f99 TODO: update differences with m-i-t 2012-01-12 14:45:11 -02:00
Lucas De Marchi
0cf2832a31 modprobe: rework module insertion without tree traversing
The dependencies line that comes from modules.dep already contains all
the dependencies necessary to insert that module. Therefore modprobe
doesn't have to do the recursion between the modules in order to load a
module. All we have to do is to load in order:

For the module being loaded:
----------------------------

1. softdeps
2. deps
3. module
4. postdeps

For any of the dependencies:
----------------------------

1. softdeps
2. module
3. softdeps
2012-01-12 14:34:19 -02:00
Lucas De Marchi
9f11c43d8d man: build modinfo man page 2012-01-12 14:33:05 -02:00
Lucas De Marchi
f57497cc9a man: build modprobe man page 2012-01-12 14:33:05 -02:00
Lucas De Marchi
dfcb8aa651 man: build rmmod man page 2012-01-12 14:33:05 -02:00
Lucas De Marchi
26df21009d man: build lsmod man page 2012-01-12 14:33:04 -02:00
Lucas De Marchi
d5578ee0db man: build insmod man page 2012-01-12 14:33:04 -02:00
Lucas De Marchi
6d96056303 man: build depmod man page 2012-01-12 14:33:04 -02:00
Lucas De Marchi
c0bcb67059 man: build modules.dep{,.bin} man pages 2012-01-12 14:33:04 -02:00
Lucas De Marchi
5173e8e842 man: build modprobe.d man page 2012-01-12 14:21:22 -02:00
Lucas De Marchi
904b57d022 build-sys: build man pages 2012-01-12 14:21:22 -02:00
Lucas De Marchi
5b24df2ffc man: convert depmod.d.sgml to xml and update it 2012-01-12 14:21:22 -02:00
Lucas De Marchi
e3ebcff7a4 build-sys: fix clean rule removing tracked files 2012-01-12 14:21:22 -02:00
Lucas De Marchi
cb8547c98f rename doc dir to man 2012-01-12 10:05:25 -02:00
Robby Workman
43042306cb doc/modprobe.sgml: Various updates wrt inclusion with kmod
* TODO: document "--remove-dependencies" flag
2012-01-12 00:07:44 -06:00
Robby Workman
2b3f9c7430 doc/depmod.sgml: Remove references to legacy map files 2012-01-12 00:07:37 -06:00
Robby Workman
e4f17fdc32 doc/depmod.sgml: Remove refs to depmod.conf 2012-01-12 00:07:20 -06:00
Robby Workman
c5570980e8 doc/depmod.d.sgml: Various touchups; mostly s/depmod.conf/depmod.d/g 2012-01-12 00:07:18 -06:00
Robby Workman
092a948850 doc/modprobe.d.sgml: Various touchups
* change references to "kmod" instead of "module-init-tools"
* remove references to modprobe.conf
2012-01-12 00:06:27 -06:00