diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2001-01-06 23:29:29 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2001-01-06 23:29:29 +0000 |
commit | adb289a23d9cec1ed29877d58614e33246fe20ba (patch) | |
tree | 31a332d36dc3027d1bf329375e0308c981df2eb3 /mdk-stage1/probing.c | |
parent | b5c67c303ce0b7b3640272d429b31b24574d58fb (diff) | |
download | drakx-backup-do-not-use-adb289a23d9cec1ed29877d58614e33246fe20ba.tar drakx-backup-do-not-use-adb289a23d9cec1ed29877d58614e33246fe20ba.tar.gz drakx-backup-do-not-use-adb289a23d9cec1ed29877d58614e33246fe20ba.tar.bz2 drakx-backup-do-not-use-adb289a23d9cec1ed29877d58614e33246fe20ba.tar.xz drakx-backup-do-not-use-adb289a23d9cec1ed29877d58614e33246fe20ba.zip |
uglyfy my shiny modules-loading code to save some stuff in /etc/modules.conf (scsi, net, modules options)
Diffstat (limited to 'mdk-stage1/probing.c')
-rw-r--r-- | mdk-stage1/probing.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c index fdfc7d097..6e95dc143 100644 --- a/mdk-stage1/probing.c +++ b/mdk-stage1/probing.c @@ -100,7 +100,7 @@ void probe_that_type(enum driver_type type) if (type == SCSI_ADAPTERS) { /* insmod takes time, let's use the wait message */ wait_message("Installing %s", pcidb[i].name); - my_insmod(pcidb[i].module); + my_insmod(pcidb[i].module, SCSI_ADAPTERS, NULL); remove_wait_message(); } #endif @@ -108,7 +108,7 @@ void probe_that_type(enum driver_type type) if (type == NETWORK_DEVICES) { /* insmod is quick, let's use the info message */ info_message("Found %s", pcidb[i].name); - my_insmod(pcidb[i].module); + my_insmod(pcidb[i].module, NETWORK_DEVICES, NULL); } #endif } @@ -376,6 +376,7 @@ int net_device_available(char * device) { close(s); return 0; } + close(s); return 1; } @@ -394,15 +395,14 @@ char ** get_net_devices(void) int i = 0; static int already_probed = 0; - if (!already_probed) + if (!already_probed) { + already_probed = 1; /* cut off loop brought by: probe_that_type => my_insmod => get_net_devices */ probe_that_type(NETWORK_DEVICES); - already_probed = 1; + } while (ptr && *ptr) { - if (net_device_available(*ptr)) { - log_message("NET: %s is available", *ptr); + if (net_device_available(*ptr)) tmp[i++] = strdup(*ptr); - } ptr++; } tmp[i++] = NULL; |