summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-03-26 20:31:52 +0000
committerThierry Vignaud <tv@mageia.org>2013-03-26 20:31:52 +0000
commitc3f63460a1aaa62ef84483f8c6d3a9140a620cd0 (patch)
tree00cf75aa3d18639cc2e69c44fa0bc5def9b84f71
parent5e6d801be879f387986317ff0e489213915f8e0f (diff)
downloaddrakx-backup-do-not-use-c3f63460a1aaa62ef84483f8c6d3a9140a620cd0.tar
drakx-backup-do-not-use-c3f63460a1aaa62ef84483f8c6d3a9140a620cd0.tar.gz
drakx-backup-do-not-use-c3f63460a1aaa62ef84483f8c6d3a9140a620cd0.tar.bz2
drakx-backup-do-not-use-c3f63460a1aaa62ef84483f8c6d3a9140a620cd0.tar.xz
drakx-backup-do-not-use-c3f63460a1aaa62ef84483f8c6d3a9140a620cd0.zip
kill now dead code
-rw-r--r--mdk-stage1/modules.c75
-rw-r--r--mdk-stage1/modules.h6
2 files changed, 0 insertions, 81 deletions
diff --git a/mdk-stage1/modules.c b/mdk-stage1/modules.c
index 92109f515..214069286 100644
--- a/mdk-stage1/modules.c
+++ b/mdk-stage1/modules.c
@@ -42,12 +42,10 @@
#include "modules.h"
static char modules_directory[100];
-static struct module_deps_elem * modules_deps = NULL;
static struct module_descr_elem * modules_descr = NULL;
extern long init_module(void *, unsigned long, const char *);
-
static const char *moderror(int err)
{
switch (err) {
@@ -122,76 +120,6 @@ static void find_modules_directory(void)
sprintf(modules_directory , "%s/%s", prefix, release);
}
-static int load_modules_dependencies(void)
-{
- char * deps_file = asprintf_("%s/%s", modules_directory, "modules.dep");
- char * buf, * ptr, * start, * end;
- struct stat s;
- int line, i;
-
- log_message("loading modules dependencies");
- buf = cat_file(deps_file, &s);
- if (!buf)
- return -1;
- line = line_counts(buf);
- modules_deps = malloc(sizeof(*modules_deps) * (line+1));
-
- start = buf;
- line = 0;
- while (start < (buf+s.st_size) && *start) {
- char * tmp_deps[50];
-
- end = strchr(start, '\n');
- *end = '\0';
-
- ptr = strchr(start, ':');
- if (!ptr) {
- start = end + 1;
- continue;
- }
- *ptr = '\0';
- ptr++;
-
- while (*ptr && (*ptr == ' ')) ptr++;
-
- /* sort of a good line */
- modules_deps[line].filename = start[0] == '/' ? strdup(start) : asprintf_("%s/%s", modules_directory, start);
- modules_deps[line].modname = filename2modname(start);
-
- start = ptr;
- i = 0;
- while (start && *start && i < sizeof(tmp_deps)/sizeof(char *)) {
- ptr = strchr(start, ' ');
- if (ptr) *ptr = '\0';
- tmp_deps[i++] = filename2modname(start);
- if (ptr)
- start = ptr + 1;
- else
- start = NULL;
- while (start && *start && *start == ' ')
- start++;
- }
- if(i >= sizeof(tmp_deps)/sizeof(char *)-1) {
- log_message("warning, more than %zu dependencies for module %s",
- sizeof(tmp_deps)/sizeof(char *)-1,
- modules_deps[line].modname);
- i = sizeof(tmp_deps)/sizeof(char *)-1;
- }
- tmp_deps[i++] = NULL;
-
- modules_deps[line].deps = _memdup(tmp_deps, sizeof(char *) * i);
-
- line++;
- start = end + 1;
- }
- modules_deps[line].modname = NULL;
-
- free(buf);
-
- return 0;
-}
-
-
static int load_modules_descriptions(void)
{
char * descr_file = asprintf_("%s/%s", modules_directory, "modules.description");
@@ -237,9 +165,6 @@ static int load_modules_descriptions(void)
void init_modules_insmoding(void)
{
find_modules_directory();
- if (load_modules_dependencies()) {
- fatal_error("warning, error initing modules stuff, modules loading disabled");
- }
if (load_modules_descriptions()) {
log_message("warning, error initing modules stuff");
}
diff --git a/mdk-stage1/modules.h b/mdk-stage1/modules.h
index fd8a22746..1a6d8753f 100644
--- a/mdk-stage1/modules.h
+++ b/mdk-stage1/modules.h
@@ -27,12 +27,6 @@ enum insmod_return my_modprobe(const char * mod_name, enum driver_type type, cha
enum return_type ask_insmod(enum driver_type);
int module_already_present(const char * name);
-struct module_deps_elem {
- char * modname;
- char * filename;
- char ** deps;
-};
-
struct module_descr_elem {
char * modname;
char * description;