Adjust to removal of moduleDeps and moduleList.
---
loader2/cdinstall.c | 14 ++----
loader2/cdinstall.h | 8 +--
loader2/driverdisk.c | 14 +----
loader2/driverdisk.h | 1 -
loader2/driverselect.c | 9 +---
loader2/hardware.c | 78 +++++----------------------
loader2/hardware.h | 22 ++------
loader2/hdinstall.c | 20 +++-----
loader2/hdinstall.h | 4 +-
loader2/loader.c | 136 +++++++++---------------------------------------
loader2/loader.h | 3 -
loader2/method.h | 5 +--
loader2/nfsinstall.c | 8 +--
loader2/nfsinstall.h | 4 +-
loader2/telnetd.c | 4 +-
loader2/telnetd.h | 4 +-
loader2/urlinstall.c | 7 +--
loader2/urlinstall.h | 4 +-
18 files changed, 70 insertions(+), 275 deletions(-)
diff --git a/loader2/cdinstall.c b/loader2/cdinstall.c
index 165348a..c6b3394 100644
--- a/loader2/cdinstall.c
+++ b/loader2/cdinstall.c
@@ -220,8 +220,7 @@ static void queryCDMediaCheck(char *dev, char *location) {
* as /mnt/runtime.
*/
char * setupCdrom(char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps modDeps, int interactive, int requirepkgs) {
+ int interactive, int requirepkgs) {
int i, r, rc;
int foundinvalid = 0;
int stage2inram = 0;
@@ -343,20 +342,15 @@ char * setupCdrom(char * location, struct loaderData_s * loaderData,
/* try to find a install CD non-interactively */
char * findAnacondaCD(char * location,
- moduleInfoSet modInfo,
- moduleList modLoaded,
- moduleDeps modDeps,
int requirepkgs) {
- return setupCdrom(location, NULL, modInfo, modLoaded, modDeps, 0, requirepkgs);
+ return setupCdrom(location, NULL, 0, requirepkgs);
}
/* look for a CD and mount it. if we have problems, ask */
char * mountCdromImage(struct installMethod * method,
- char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr) {
+ char * location, struct loaderData_s * loaderData) {
- return setupCdrom(location, loaderData, modInfo, modLoaded, *modDepsPtr, 1, 1);
+ return setupCdrom(location, loaderData, 1, 1);
}
void setKickstartCD(struct loaderData_s * loaderData, int argc, char ** argv) {
diff --git a/loader2/cdinstall.h b/loader2/cdinstall.h
index cf3a64e..314a2c5 100644
--- a/loader2/cdinstall.h
+++ b/loader2/cdinstall.h
@@ -4,13 +4,9 @@
#include "method.h"
char * mountCdromImage(struct installMethod * method,
- char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr);
+ char * location, struct loaderData_s * loaderData);
-char * findAnacondaCD(char * location, moduleInfoSet modInfo,
- moduleList modLoaded, moduleDeps modDeps,
- int requirepkgs);
+char * findAnacondaCD(char * location, int requirepkgs);
void setKickstartCD(struct loaderData_s * loaderData, int argc,
diff --git a/loader2/driverdisk.c b/loader2/driverdisk.c
index 6707ad4..d4bca34 100644
--- a/loader2/driverdisk.c
+++ b/loader2/driverdisk.c
@@ -32,7 +32,6 @@
#include "fwloader.h"
#include "method.h"
#include "modules.h"
-#include "moduledeps.h"
#include "moduleinfo.h"
#include "windows.h"
#include "hardware.h"
@@ -96,7 +95,6 @@ static void copyErrorFn (char *msg) {
/* this copies the contents of the driver disk to a ramdisk and loads
* the moduleinfo, etc. assumes a "valid" driver disk mounted at mntpt */
static int loadDriverDisk(struct loaderData_s *loaderData, char *mntpt) {
- moduleDeps *modDepsPtr = loaderData->modDepsPtr;
moduleInfoSet modInfo = loaderData->modInfo;
char file[200], dest[200];
char * title;
@@ -154,9 +152,6 @@ static int loadDriverDisk(struct loaderData_s *loaderData, char *mntpt) {
sprintf(file, "%s/modinfo", mntpt);
readModuleInfo(file, modInfo, location, 1);
- sprintf(file, "%s/modules.dep", mntpt);
- mlLoadDeps(modDepsPtr, file);
-
sprintf(file, "%s/modules.alias", mntpt);
pciReadDrivers(file);
@@ -241,10 +236,6 @@ int getRemovableDevices(char *** devNames) {
*/
int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
int usecancel, int noprobe) {
- moduleList modLoaded = loaderData->modLoaded;
- moduleDeps *modDepsPtr = loaderData->modDepsPtr;
- moduleInfoSet modInfo = loaderData->modInfo;
-
char * device = NULL, * part = NULL, * ddfile = NULL;
char ** devNames = NULL;
enum { DEV_DEVICE, DEV_PART, DEV_CHOOSEFILE, DEV_LOADFILE,
@@ -470,7 +461,7 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
break;
}
- busProbe(modInfo, modLoaded, *modDepsPtr, 0);
+ busProbe(0);
devices = probeDevices(class, BUS_UNSPEC, PROBE_LOADED);
if (devices)
@@ -550,8 +541,7 @@ static void loadFromLocation(struct loaderData_s * loaderData, char * dir) {
}
loadDriverDisk(loaderData, dir);
- busProbe(loaderData->modInfo, loaderData->modLoaded, *
- loaderData->modDepsPtr, 0);
+ busProbe(0);
}
void getDDFromSource(struct loaderData_s * loaderData, char * src) {
diff --git a/loader2/driverdisk.h b/loader2/driverdisk.h
index a9aece6..93da18e 100644
--- a/loader2/driverdisk.h
+++ b/loader2/driverdisk.h
@@ -3,7 +3,6 @@
#include "loader.h"
#include "modules.h"
-#include "moduledeps.h"
#include "moduleinfo.h"
int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
diff --git a/loader2/driverselect.c b/loader2/driverselect.c
index 17adf69..acba7d5 100644
--- a/loader2/driverselect.c
+++ b/loader2/driverselect.c
@@ -141,7 +141,6 @@ int chooseManualDriver(int class, struct loaderData_s *loaderData) {
struct sortModuleList * sortedOrder;
char giveArgs = ' ';
char ** moduleArgs = NULL;
- moduleDeps modDeps = *loaderData->modDepsPtr;
moduleInfoSet modInfo = loaderData->modInfo;
newtComponent text, f, ok, back, argcheckbox, listbox;
@@ -167,11 +166,6 @@ int chooseManualDriver(int class, struct loaderData_s *loaderData) {
numSorted = 0;
for (i = 0; i < modInfo->numModules; i++) {
- if (mlModuleInList(modInfo->moduleList[i].moduleName, loaderData->modLoaded) ||
- !modInfo->moduleList[i].description ||
- ((type != DRIVER_ANY) &&
- (type != modInfo->moduleList[i].major)))
- continue;
sortedOrder[numSorted].index = i;
sortedOrder[numSorted++].modInfo = modInfo;
}
@@ -274,8 +268,7 @@ int chooseManualDriver(int class, struct loaderData_s *loaderData) {
return chooseManualDriver(class, loaderData);
}
- mlLoadModule(modInfo->moduleList[num].moduleName, loaderData->modLoaded, modDeps,
- modInfo, moduleArgs);
+ mlLoadModule(modInfo->moduleList[num].moduleName, moduleArgs);
free(sortedOrder);
return LOADER_OK;
diff --git a/loader2/hardware.c b/loader2/hardware.c
index fff8407..ccd40dd 100644
--- a/loader2/hardware.c
+++ b/loader2/hardware.c
@@ -156,8 +156,7 @@ int probeiSeries(moduleInfoSet modInfo, moduleList modLoaded,
* FIXME: this syntax is likely to change in a future release
* but is done as a quick hack for the present.
*/
-int earlyModuleLoad(moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps modDeps, int justProbe) {
+int earlyModuleLoad(int justProbe) {
int fd, len, i;
char buf[1024], *cmdLine;
int argc;
@@ -181,77 +180,31 @@ int earlyModuleLoad(moduleInfoSet modInfo, moduleList modLoaded,
for (i=0; i < argc; i++) {
if (!strncasecmp(argv[i], "driverload=", 11)) {
logMessage(INFO, "loading %s early", argv[i] + 11);
- mlLoadModuleSet(argv[i] + 11, modLoaded, modDeps, modInfo);
+ mlLoadModuleSet(argv[i] + 11);
}
}
return 0;
}
-int busProbe(moduleInfoSet modInfo, moduleList modLoaded, moduleDeps modDeps,
- int justProbe) {
- int i;
- char ** modList;
- char modules[1024];
-
- /* we always want to try to find out about pcmcia controllers even
- * if using noprobe */
- initializePcmciaController(modLoaded, modDeps, modInfo);
-
- /* we can't really *probe* on iSeries, but we can pretend */
- probeiSeries(modInfo, modLoaded, modDeps);
-
+int busProbe(int justProbe) {
/* autodetect whatever we can */
- if (detectHardware(modInfo, &modList)) {
- logMessage(ERROR, "failed to scan pci bus!");
+ if (justProbe)
return 0;
- } else if (modList && justProbe) {
- for (i = 0; modList[i]; i++)
- printf("%s
", modList[i]);
- } else if (modList) {
- *modules = ' ';
-
- for (i = 0; modList[i]; i++) {
- if (i) strcat(modules, ":");
- strcat(modules, modList[i]);
- }
-
- mlLoadModuleSet(modules, modLoaded, modDeps, modInfo);
- } else
- logMessage(INFO, "found nothing");
-
- return 0;
+ return detectHardware(NULL);
}
-void ipv6Setup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo) {
+void ipv6Setup() {
if (!FL_NOIPV6(flags))
- mlLoadModule("ipv6", modLoaded, modDeps, modInfo, NULL);
-}
-
-
-void scsiSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo) {
- mlLoadModuleSet("scsi_mod:sd_mod:sr_mod", modLoaded, modDeps, modInfo);
-#if defined(__s390__) || defined(__s390x__)
- mlLoadModule("zfcp", modLoaded, modDeps, modInfo, NULL);
-#endif
- mlLoadModule("iscsi_tcp", modLoaded, modDeps, modInfo, NULL);
-}
-
-void ideSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo) {
- mlLoadModuleSet("cdrom:ide-cd", modLoaded, modDeps, modInfo);
+ mlLoadModule("ipv6", NULL);
}
-
/* check if the system has been booted with dasd parameters */
/* These parameters define the order in which the DASDs */
/* are visible to Linux. Otherwise load dasd modules probeonly, */
/* then parse proc to find active DASDs */
/* Reload dasd_mod with correct range of DASD ports */
-void dasdSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo) {
+void dasdSetup() {
#if !defined(__s390__) && !defined(__s390x__)
return;
#else
@@ -283,24 +236,21 @@ void dasdSetup(moduleList modLoaded, moduleDeps modDeps,
free(line);
}
if(dasd_parms[0]) {
- mlLoadModule("dasd_mod", modLoaded, modDeps, modInfo, dasd_parms);
+ mlLoadModule("dasd_mod", dasd_parms);
- mlLoadModuleSet("dasd_diag_mod:dasd_fba_mod:dasd_e ckd_mod",
- modLoaded, modDeps, modInfo);
+ mlLoadModuleSet("dasd_diag_mod:dasd_fba_mod:dasd_e ckd_mod");
free(dasd_parms);
return;
} else {
dasd_parms[0] = "dasd=autodetect";
- mlLoadModule("dasd_mod", modLoaded, modDeps, modInfo, dasd_parms);
- mlLoadModuleSet("dasd_diag_mod:dasd_fba_mod:dasd_e ckd_mod",
- modLoaded, modDeps, modInfo);
+ mlLoadModule("dasd_mod", dasd_parms);
+ mlLoadModuleSet("dasd_diag_mod:dasd_fba_mod:dasd_e ckd_mod");
free(dasd_parms);
}
#endif
}
-void spufsSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo) {
+void spufsSetup() {
#if !defined(__powerpc__)
return;
#else
@@ -311,7 +261,7 @@ void spufsSetup(moduleList modLoaded, moduleDeps modDeps,
while (fgets(buf, 1024, fd) != NULL) {
if(!strncmp(buf, "cpu :", 5)) {
if(strstr(buf, "Cell")) {
- mlLoadModule("spufs", modLoaded, modDeps, modInfo, NULL);
+ mlLoadModule("spufs", NULL);
break;
}
}
diff --git a/loader2/hardware.h b/loader2/hardware.h
index db96610..b9d1ce8 100644
--- a/loader2/hardware.h
+++ b/loader2/hardware.h
@@ -3,24 +3,12 @@
#include "modules.h"
-int scsiTapeInitialize(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo);
+int earlyModuleLoad(int justProbe);
+int busProbe(int justProbe);
-int earlyModuleLoad(moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps modDeps, int justProbe);
-int busProbe(moduleInfoSet modInfo, moduleList modLoaded, moduleDeps modDeps,
- int justProbe);
+void dasdSetup();
-void scsiSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo);
-void ideSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo);
-void dasdSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo);
+void ipv6Setup();
-void ipv6Setup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo);
-
-void spufsSetup(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo);
+void spufsSetup();
#endif
diff --git a/loader2/hdinstall.c b/loader2/hdinstall.c
index e9780d2..f238e1c 100644
--- a/loader2/hdinstall.c
+++ b/loader2/hdinstall.c
@@ -50,9 +50,7 @@ extern uint64_t flags;
/* pull in second stage image for hard drive install */
static int loadHDImages(char * prefix, char * dir,
char * device, char * mntpoint,
- char * location,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr) {
+ char * location) {
int fd = 0, rc, idx;
char *path, *target = NULL, *dest, *cdurl;
char *stg2list[] = {"stage2.img", "minstg2.img", NULL};
@@ -65,7 +63,7 @@ static int loadHDImages(char * prefix, char * dir,
idx = 0;
/* try to see if we're booted off of a CD with stage2 */
- cdurl = findAnacondaCD(location, modInfo, modLoaded, *modDepsPtr, 0);
+ cdurl = findAnacondaCD(location, 0);
if (cdurl) {
logMessage(INFO, "Detected stage 2 image on CD");
winStatus(50, 3, _("Media Detected"),
@@ -132,9 +130,7 @@ static int loadHDImages(char * prefix, char * dir,
}
/* given a partition device and directory, tries to mount hd install image */
-static char * setupIsoImages(char * device, char * dirName, char * location,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr) {
+static char * setupIsoImages(char * device, char * dirName, char * location) {
int rc;
char * url;
char filespec[1024];
@@ -172,7 +168,7 @@ static char * setupIsoImages(char * device, char * dirName, char * location,
/* This code is for copying small stage2 into ram */
/* and mounting */
rc = loadHDImages("/tmp/loopimage", "/", "/dev/loop1",
- "/mnt/runtime", location, modInfo, modLoaded, modDepsPtr);
+ "/mnt/runtime", location);
if (rc) {
newtWinMessage(_("Error"), _("OK"),
_("An error occured reading the install "
@@ -209,9 +205,7 @@ static char * setupIsoImages(char * device, char * dirName, char * location,
* ISO images on that filesystem
*/
char * mountHardDrive(struct installMethod * method,
- char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr) {
+ char * location, struct loaderData_s * loaderData) {
int rc;
int i;
@@ -251,7 +245,7 @@ char * mountHardDrive(struct installMethod * method,
if (!strncmp(kspart, "/dev/", 5))
kspart = kspart + 5;
- url = setupIsoImages(kspart, ksdirectory, location, modInfo, modLoaded, modDepsPtr);
+ url = setupIsoImages(kspart, ksdirectory, location);
if (!url) {
logMessage(ERROR, "unable to find %s installation images on hd",
getProductName());
@@ -384,7 +378,7 @@ char * mountHardDrive(struct installMethod * method,
logMessage(INFO, "partition %s selected", selpart);
- url = setupIsoImages(selpart + 5, dir, location, modInfo, modLoaded, modDepsPtr);
+ url = setupIsoImages(selpart + 5, dir, location);
if (!url) {
newtWinMessage(_("Error"), _("OK"),
_("Device %s does not appear to contain "
diff --git a/loader2/hdinstall.h b/loader2/hdinstall.h
index dcb59b3..317b733 100644
--- a/loader2/hdinstall.h
+++ b/loader2/hdinstall.h
@@ -12,9 +12,7 @@ struct hdInstallData {
void setKickstartHD(struct loaderData_s * loaderData, int argc,
char ** argv);
char * mountHardDrive(struct installMethod * method,
- char * location, struct loaderData_s * loaderData,
- moduleInfoSet modInfo, moduleList modLoaded,
- moduleDeps * modDepsPtr);
+ char * location, struct loaderData_s * loaderData);
int kickstartFromHD(char *kssrc);
int kickstartFromBD(char *kssrc);
diff --git a/loader2/loader.c b/loader2/loader.c
index 3792671..d330254 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -63,16 +63,11 @@
/* module stuff */
#include "modules.h"
#include "moduleinfo.h"
-#include "moduledeps.h"
-#include "modstubs.h"
#include "driverdisk.h"
/* hardware stuff */
#include "hardware.h"
-#include "firewire.h"
-#include "pcmcia.h"
-#include "usb.h"
/* install method stuff */
#include "method.h"
@@ -244,8 +239,7 @@ char * getProductPath(void) {
return productPath;
}
-void initializeConsole(moduleList modLoaded, moduleDeps modDeps,
- moduleInfoSet modInfo) {
+void initializeConsole() {
/* enable UTF-8 console */
printf(" |