summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-07-01 17:35:31 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-07-01 17:48:10 +0200
commit72df247649cf1c466974d67d796a36934bdacf8e (patch)
treea2cdf6b323b2b3ef4ff0cd6dd35650aa2d9a2c24 /mdk-stage1
parentdca3a0bf7c1b807b8a568c436b0225f7c1c2762c (diff)
downloaddrakx-72df247649cf1c466974d67d796a36934bdacf8e.tar
drakx-72df247649cf1c466974d67d796a36934bdacf8e.tar.gz
drakx-72df247649cf1c466974d67d796a36934bdacf8e.tar.bz2
drakx-72df247649cf1c466974d67d796a36934bdacf8e.tar.xz
drakx-72df247649cf1c466974d67d796a36934bdacf8e.zip
stop tracking network interface descriptions
this is now useless after previous commit
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/modules.c1
-rw-r--r--mdk-stage1/probing.c40
-rw-r--r--mdk-stage1/probing.h2
3 files changed, 0 insertions, 43 deletions
diff --git a/mdk-stage1/modules.c b/mdk-stage1/modules.c
index 214069286..5b470269e 100644
--- a/mdk-stage1/modules.c
+++ b/mdk-stage1/modules.c
@@ -353,7 +353,6 @@ enum insmod_return my_modprobe(const char * mod_name, enum driver_type type __at
sprintf(alias, "alias %s %s", *new_net_devices, mod_name);
add_modules_conf(alias);
log_message("NET: %s", alias);
- net_discovered_interface(*new_net_devices);
already_present:
new_net_devices++;
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c
index b9420deb7..acad4701b 100644
--- a/mdk-stage1/probing.c
+++ b/mdk-stage1/probing.c
@@ -84,47 +84,10 @@ static void warning_insmod_failed(enum insmod_return r)
}
#ifndef DISABLE_NETWORK
-struct net_description_elem
-{
- char * intf_name;
- char * intf_description;
-};
-static struct net_description_elem net_descriptions[50];
-static int net_descr_number = 0;
-static char * intf_descr_for_discover = NULL;
-static char * net_intf_too_early_name[50]; /* for modules providing more than one net intf */
-static int net_intf_too_early_number = 0;
-static int net_intf_too_early_ptr = 0;
-
const char * safe_descr(const char * text) {
return text ? text : "unknown";
}
-void prepare_intf_descr(const char * intf_descr)
-{
- intf_descr_for_discover = strdup(intf_descr);
-}
-
-void net_discovered_interface(char * intf_name)
-{
- if (!intf_descr_for_discover) {
- net_intf_too_early_name[net_intf_too_early_number++] = strdup(intf_name);
- return;
- }
- if (!intf_name) {
- if (net_intf_too_early_ptr >= net_intf_too_early_number) {
- log_message("NET: was expecting another network interface (broken net module?) [%d >= %d]", net_intf_too_early_ptr, net_intf_too_early_number);
- return;
- }
- net_descriptions[net_descr_number].intf_name = net_intf_too_early_name[net_intf_too_early_ptr++];
- }
- else
- net_descriptions[net_descr_number].intf_name = strdup(intf_name);
- net_descriptions[net_descr_number].intf_description = strdup(intf_descr_for_discover);
- intf_descr_for_discover = NULL;
- net_descr_number++;
-}
-
char * get_net_intf_description(char * intf_name)
{
struct ifreq ifr;
@@ -301,12 +264,9 @@ void discovered_device(enum driver_type type, const char * description, const ch
if (type == NETWORK_DEVICES) {
log_message("NET: Loading driver for network device %s", description);
wait_message("Loading driver for network device:\n \n%s", description);
- prepare_intf_descr(description);
failed = my_modprobe(driver, NETWORK_DEVICES, NULL);
warning_insmod_failed(failed);
remove_wait_message();
- if (intf_descr_for_discover) /* for modules providing more than one net intf */
- net_discovered_interface(NULL);
}
#endif
#ifdef ENABLE_USB
diff --git a/mdk-stage1/probing.h b/mdk-stage1/probing.h
index 63c44a4cb..702c9d056 100644
--- a/mdk-stage1/probing.h
+++ b/mdk-stage1/probing.h
@@ -37,9 +37,7 @@ enum media_bus { BUS_IDE, BUS_SCSI, BUS_USB, BUS_PCMCIA, BUS_ANY };
void find_media(enum media_bus bus);
void get_medias(enum media_type media, char *** names, char *** models, enum media_bus bus);
char ** get_net_devices(void);
-void net_discovered_interface(char * intf_name);
char * get_net_intf_description(char * intf_name);
-void prepare_intf_descr(const char * intf_descr);
void probe_that_type(enum driver_type type, enum media_bus bus);
/* Make sure the MATCH_ALL value is greater than all possible values