mirror of
https://github.com/AuxXxilium/kmod.git
synced 2024-12-27 22:07:40 +07:00
compatibility: match commands using fnmatch() instead of strcmp().
module-init-tools modprobe.c use fnmatch() and not strcmp() to match commands and softdeps, although the man page does not say so. Then use the same function to provide compatibility.
This commit is contained in:
parent
e793f1eae9
commit
a6bf2495f6
@ -835,7 +835,7 @@ KMOD_EXPORT const char *kmod_module_get_install_commands(const struct kmod_modul
|
||||
kmod_list_foreach(l, ctx_install_commands) {
|
||||
const char *modname = kmod_command_get_modname(l);
|
||||
|
||||
if (strcmp(modname, mod->name) != 0)
|
||||
if (fnmatch(modname, mod->name, 0) != 0)
|
||||
continue;
|
||||
|
||||
m->install_commands = kmod_command_get_command(l);
|
||||
@ -993,7 +993,7 @@ KMOD_EXPORT const char *kmod_module_get_remove_commands(const struct kmod_module
|
||||
kmod_list_foreach(l, ctx_remove_commands) {
|
||||
const char *modname = kmod_command_get_modname(l);
|
||||
|
||||
if (strcmp(modname, mod->name) != 0)
|
||||
if (fnmatch(modname, mod->name, 0) != 0)
|
||||
continue;
|
||||
|
||||
m->remove_commands = kmod_command_get_command(l);
|
||||
|
Loading…
Reference in New Issue
Block a user