summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-01-13 18:38:30 +0000
committerThierry Vignaud <tv@mageia.org>2012-01-13 18:38:30 +0000
commitd49eeebb3db74cfb2d68a6989c14f1c9961357b7 (patch)
treee785f2e30401d67ef797f7a4fa6988dedf75f3c1 /mdk-stage1
parentc990f18b155433c4069e1210cfb48d1b3c033ffb (diff)
downloaddrakx-d49eeebb3db74cfb2d68a6989c14f1c9961357b7.tar
drakx-d49eeebb3db74cfb2d68a6989c14f1c9961357b7.tar.gz
drakx-d49eeebb3db74cfb2d68a6989c14f1c9961357b7.tar.bz2
drakx-d49eeebb3db74cfb2d68a6989c14f1c9961357b7.tar.xz
drakx-d49eeebb3db74cfb2d68a6989c14f1c9961357b7.zip
(memdup) rename as _memdup() in order to prevent a symbol clash with libkmod
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/automatic.c8
-rw-r--r--mdk-stage1/modules.c2
-rw-r--r--mdk-stage1/params.c4
-rw-r--r--mdk-stage1/probing.c8
-rw-r--r--mdk-stage1/utils.c4
-rw-r--r--mdk-stage1/utils.h2
6 files changed, 14 insertions, 14 deletions
diff --git a/mdk-stage1/automatic.c b/mdk-stage1/automatic.c
index 561aa62d9..804c301cc 100644
--- a/mdk-stage1/automatic.c
+++ b/mdk-stage1/automatic.c
@@ -46,14 +46,14 @@ void grab_automatic_params(char * line)
int j = i;
while (line[i] != ':' && line[i] != '\0')
i++;
- name = memdup(&line[j], i-j + 1);
+ name = _memdup(&line[j], i-j + 1);
name[i-j] = 0;
k = i+1;
i++;
while (line[i] != ',' && line[i] != '\0')
i++;
- value = memdup(&line[k], i-k + 1);
+ value = _memdup(&line[k], i-k + 1);
value[i-k] = 0;
tmp_params[p].name = name;
@@ -65,7 +65,7 @@ void grab_automatic_params(char * line)
}
tmp_params[p++].name = NULL;
- automatic_params = memdup(tmp_params, sizeof(struct param_elem) * p);
+ automatic_params = _memdup(tmp_params, sizeof(struct param_elem) * p);
log_message("AUTOMATIC MODE: got %d params", p-1);
}
@@ -160,7 +160,7 @@ enum return_type ask_from_entries_auto(char *msg, char ** questions, char *** an
questions_auto++;
}
- *answers = memdup(tmp_answers, sizeof(char *) * i);
+ *answers = _memdup(tmp_answers, sizeof(char *) * i);
return RETURN_OK;
}
}
diff --git a/mdk-stage1/modules.c b/mdk-stage1/modules.c
index 9cbb43598..bdbbeff16 100644
--- a/mdk-stage1/modules.c
+++ b/mdk-stage1/modules.c
@@ -181,7 +181,7 @@ static int load_modules_dependencies(void)
}
tmp_deps[i++] = NULL;
- modules_deps[line].deps = memdup(tmp_deps, sizeof(char *) * i);
+ modules_deps[line].deps = _memdup(tmp_deps, sizeof(char *) * i);
line++;
start = end + 1;
diff --git a/mdk-stage1/params.c b/mdk-stage1/params.c
index 75bf6ae07..aeac024c8 100644
--- a/mdk-stage1/params.c
+++ b/mdk-stage1/params.c
@@ -63,7 +63,7 @@ void process_cmdline(void)
i++;
continue;
}
- name = memdup(&buf[j], i-j + 1);
+ name = _memdup(&buf[j], i-j + 1);
name[i-j] = '\0';
if (buf[i] == '=') {
@@ -71,7 +71,7 @@ void process_cmdline(void)
i++;
while (buf[i] != ' ' && buf[i] != '\0')
i++;
- value = memdup(&buf[k], i-k + 1);
+ value = _memdup(&buf[k], i-k + 1);
value[i-k] = '\0';
}
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c
index 0db75ffbd..6b969300b 100644
--- a/mdk-stage1/probing.c
+++ b/mdk-stage1/probing.c
@@ -872,7 +872,7 @@ void find_media(enum media_bus bus)
tmp[count].name = NULL;
count++;
- medias = memdup(tmp, sizeof(struct media_info) * count);
+ medias = _memdup(tmp, sizeof(struct media_info) * count);
}
@@ -899,8 +899,8 @@ void get_medias(enum media_type media, char *** names, char *** models, enum med
tmp_names[count] = NULL;
tmp_models[count++] = NULL;
- *names = memdup(tmp_names, sizeof(char *) * count);
- *models = memdup(tmp_models, sizeof(char *) * count);
+ *names = _memdup(tmp_names, sizeof(char *) * count);
+ *models = _memdup(tmp_models, sizeof(char *) * count);
}
@@ -966,7 +966,7 @@ char ** get_net_devices(void)
tmp[i++] = NULL;
- return memdup(tmp, sizeof(char *) * i);
+ return _memdup(tmp, sizeof(char *) * i);
}
#endif /* DISABLE_NETWORK */
diff --git a/mdk-stage1/utils.c b/mdk-stage1/utils.c
index 03f6db668..7567a3862 100644
--- a/mdk-stage1/utils.c
+++ b/mdk-stage1/utils.c
@@ -92,7 +92,7 @@ int total_memory(void)
}
/* pixel's */
-void * memdup(void *src, size_t size)
+void * _memdup(void *src, size_t size)
{
void * r;
r = malloc(size);
@@ -128,7 +128,7 @@ char ** list_directory(char * direct)
if (dp)
closedir(dp);
tmp[i] = NULL;
- return memdup(tmp, sizeof(char*) * (i+1));
+ return _memdup(tmp, sizeof(char*) * (i+1));
}
diff --git a/mdk-stage1/utils.h b/mdk-stage1/utils.h
index e4c8030c0..b6e6d2b68 100644
--- a/mdk-stage1/utils.h
+++ b/mdk-stage1/utils.h
@@ -22,7 +22,7 @@ off_t file_size(const char * path);
char * cat_file(const char * file, struct stat * s);
int line_counts(const char * buf);
int total_memory(void);
-void * memdup(void *src, size_t size);
+void * _memdup(void *src, size_t size);
void add_to_env(char * name, char * value);
char ** list_directory(char * direct);
int string_array_length(char ** a);