]> git.ipfire.org Git - thirdparty/kmod.git/commit
kmod-depmod: fix replacement of existing modules.
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Tue, 3 Jan 2012 18:14:57 +0000 (16:14 -0200)
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Tue, 3 Jan 2012 18:14:57 +0000 (16:14 -0200)
commit3db5bf9d38ba701aa21d7f3235b83c286a8b1cdd
tree0e5a8728680fdcb3f1e50d4be722d3f473f3643e
parent026c7b448dc310e57f312e5497ef806d6c976ed8
kmod-depmod: fix replacement of existing modules.

We cannot create a kmod_module for existing module name, it will fail
due existing in the hash table "modules_by_name".

To avoid it, we first delete the existing module, if lower priority,
then add the new one.

kmod_module_new_from_path() is called only when the former module was
deleted or does not exist.
tools/kmod-depmod.c