]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod-module: probe: change insertion to cover more use cases
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Sun, 29 Jan 2012 03:49:09 +0000 (01:49 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Mon, 30 Jan 2012 22:05:33 +0000 (20:05 -0200)
commitb1a51256a9ed581cac9a3887ddb6aa316e8dbcd5
tree9d0c67cbf8076a05135cbb41188a1d680e06c62b
parentece09aac7f516549c6f14b7af68cd9c24d709b68
libkmod-module: probe: change insertion to cover more use cases

Split kmod_module_probe_insert_module() in 2:
1) Get list of modules to be loaded
2) Iterate the list, loading the module

With this in future we will be able to cover use cases of modprobe,
that has a logic a bit more complicated.

With this we also change the logic to detect dependency loops: instead
of checking the recursion every STEP times, we now keep a field in
kmod_module, marking it as visited. We simply ignore already visited
modules and thus we break loops.
libkmod/libkmod-module.c
libkmod/libkmod.h