Use underscores() in module names and aliases
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Wed, 30 Nov 2011 04:14:57 +0000 (02:14 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Wed, 30 Nov 2011 04:14:57 +0000 (02:14 -0200)
libkmod/libkmod-config.c

index 46ea24f..dfecb1f 100644 (file)
@@ -123,7 +123,8 @@ int kmod_parse_config_file(struct kmod_ctx *ctx, const char *filename,
                                goto syntax_error;
 
                        config->aliases = add_alias(ctx, config->aliases,
-                                                       alias, modname);
+                                               underscores(ctx, alias),
+                                               underscores(ctx, modname));
                } else if (!strcmp(cmd, "blacklist")) {
                        char *modname = strtok(NULL, "\t ");
 
@@ -131,7 +132,8 @@ int kmod_parse_config_file(struct kmod_ctx *ctx, const char *filename,
                                goto syntax_error;
 
                        config->blacklists = add_blacklist(ctx,
-                                               config->blacklists, modname);
+                                               config->blacklists,
+                                               underscores(ctx, modname));
                } else if (!strcmp(cmd, "include") || !strcmp(cmd, "options")
                                || !strcmp(cmd, "install")
                                || !strcmp(cmd, "remove")