depmod: fix handling of .gz modules

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2009-05-18 13:08:04 +02:00
parent c396fe6306
commit 16bda3bd1f
3 changed files with 47 additions and 14 deletions

View file

@ -57,7 +57,7 @@ char * FAST_FUNC filename2modname(const char *filename, char *modname)
from = bb_get_last_path_component_nostrip(filename);
for (i = 0; i < (MODULE_NAME_LEN-1) && from[i] != '\0' && from[i] != '.'; i++)
modname[i] = (from[i] == '-') ? '_' : from[i];
modname[i] = 0;
modname[i] = '\0';
return modname;
}