summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-06-07 20:03:04 +0000
committerMatt Wilson <msw@redhat.com>1999-06-07 20:03:04 +0000
commita2f51de36fb9e86d108bb3972db7a719a52ea253 (patch)
treed947decedd3af0c7007d0642c44be5c36ba4c100
parentb618b84a39b515482a1f6d91ddbf30fa95c424b4 (diff)
downloadanaconda-a2f51de36fb9e86d108bb3972db7a719a52ea253.tar.gz
anaconda-a2f51de36fb9e86d108bb3972db7a719a52ea253.tar.xz
anaconda-a2f51de36fb9e86d108bb3972db7a719a52ea253.zip
load modules
-rw-r--r--loader/Makefile7
-rw-r--r--loader/loader.c23
2 files changed, 28 insertions, 2 deletions
diff --git a/loader/Makefile b/loader/Makefile
index d28848798..c7dcb776b 100644
--- a/loader/Makefile
+++ b/loader/Makefile
@@ -38,7 +38,12 @@ install: all
install -s init $(DESTDIR)/sbin/loader
loader: $(OBJS)
- $(CC) $(STATIC) -o $@ $(OBJS) -lpopt -lnewt -lslang
+ $(CC) $(STATIC) -o $@ $(OBJS) -lpopt \
+ ../isys/pci/libpciprobe.a ../isys/isys.a \
+ ../isys/modutils/insmod/libmodutils.a \
+ ../isys/modutils/util/libutil.a \
+ ../isys/modutils/obj/libobj.a \
+ -lrpm -lz
init: init.o $(MINILIBC)
$(CC) $(STATIC) -g $(LDFLAGS) -o $@ init.o $(MINILIBC)
diff --git a/loader/loader.c b/loader/loader.c
index a0b1e85b3..c48b790c8 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -24,6 +24,8 @@
#include <popt.h>
#include <newt.h>
#include "isys/imount.h"
+#include "isys/isys.h"
+#include "isys/pci/pciprobe.h"
#define _(x) x
@@ -31,6 +33,7 @@ int main(int argc, char ** argv) {
char * arg;
poptContext optCon;
int testing, rc;
+ char ** modules, *module;
struct poptOption optionTable[] = {
{ "test", '\0', POPT_ARG_NONE, &testing, 0 },
{ 0, 0, 0, 0, 0 }
@@ -50,13 +53,31 @@ int main(int argc, char ** argv) {
exit(1);
}
+ if (probePciReadDrivers(testing ? "../isys/pci/pcitable" :
+ "/etc/pcitable")) {
+ perror("error reading pci table");
+ return 1;
+ }
+
+ modules = probePciDriverList();
+ module = *modules++;
+ while (module && *module) {
+ if (!testing)
+ insmod(module, NULL);
+ else
+ printf("If I were not testing, I would run insmod(%s, NULL);\n",
+ module);
+ module = *modules++;
+ }
+
+ /*
newtInit();
newtDrawRootText(0, 0, _("Welcome to Red Hat Linux"));
newtPushHelpLine(_(" <Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen "));
newtFinished();
-
+ */
execv(testing ? "../anaconda" : "/sbin/anaconda", argv);
return 0;