summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/probing.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-05-15 15:30:34 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-05-15 15:30:34 +0000
commit1d37d6bb722fe795289f4eaef6f89063868320c8 (patch)
tree640456abb6d3aef5841803f33fb26b3403171c92 /mdk-stage1/probing.c
parentb4fb40d5d5017449f2dddb5b8e45d63df7f5c170 (diff)
downloaddrakx-1d37d6bb722fe795289f4eaef6f89063868320c8.tar
drakx-1d37d6bb722fe795289f4eaef6f89063868320c8.tar.gz
drakx-1d37d6bb722fe795289f4eaef6f89063868320c8.tar.bz2
drakx-1d37d6bb722fe795289f4eaef6f89063868320c8.tar.xz
drakx-1d37d6bb722fe795289f4eaef6f89063868320c8.zip
better modules handling interface (use of enum rather than guessing single numbers..)
Diffstat (limited to 'mdk-stage1/probing.c')
-rw-r--r--mdk-stage1/probing.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c
index d0ea315a1..ba7572831 100644
--- a/mdk-stage1/probing.c
+++ b/mdk-stage1/probing.c
@@ -59,9 +59,11 @@ struct media_info {
};
-static void warning_insmod_failed(void)
+static void warning_insmod_failed(enum insmod_return r)
{
- error_message("Warning, installation of driver failed. (please include msg from <Alt-F3> for bugreports)");
+ if (r != INSMOD_OK
+ && !(IS_AUTOMATIC && r == INSMOD_FAILED_FILE_NOT_FOUND))
+ error_message("Warning, installation of driver failed. (please include msg from <Alt-F3> for bugreports)");
}
#ifndef DISABLE_NETWORK
@@ -165,8 +167,7 @@ static void probe_that_type(enum driver_type type)
wait_message("Installing %s", pcidb[i].name);
garb = my_insmod(pcidb[i].module, SCSI_ADAPTERS, NULL);
remove_wait_message();
- if (garb && !(IS_AUTOMATIC && garb == -2))
- warning_insmod_failed();
+ warning_insmod_failed(garb);
}
#endif
#ifndef DISABLE_NETWORK
@@ -174,9 +175,7 @@ static void probe_that_type(enum driver_type type)
/* insmod is quick, let's use the info message */
info_message("Found %s", pcidb[i].name);
prepare_intf_descr(pcidb[i].name);
- garb = my_insmod(pcidb[i].module, NETWORK_DEVICES, NULL);
- if (garb && !(IS_AUTOMATIC && garb == -2))
- warning_insmod_failed();
+ warning_insmod_failed(my_insmod(pcidb[i].module, NETWORK_DEVICES, NULL));
if (intf_descr_for_discover) /* for modules providing more than one net intf */
net_discovered_interface(NULL);
}