diff options
Diffstat (limited to 'mdk-stage1/modules.c')
-rw-r--r-- | mdk-stage1/modules.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mdk-stage1/modules.c b/mdk-stage1/modules.c index 3b4a94279..0c9aa0c32 100644 --- a/mdk-stage1/modules.c +++ b/mdk-stage1/modules.c @@ -92,13 +92,20 @@ static char *kernel_module_extension(void) static char *filename2modname(char * filename) { - char *modname; + char *modname, *p; modname = strdup(basename(filename)); if (strstr(modname, kernel_module_extension())) { modname[strlen(modname)-strlen(kernel_module_extension())] = '\0'; /* remove trailing .ko.gz */ } + p = modname; + while (p && *p) { + if (*p == '-') + *p = '_'; + p++; + } + return modname; } |