summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1999-08-10 15:41:27 +0000
committerErik Troan <ewt@redhat.com>1999-08-10 15:41:27 +0000
commit75fd52271c0ae636a31f6a9377abfd909c784857 (patch)
treeb82b82eeafb95054c3c7daffd20df4506db4327a /loader
parent33a274128e257c4c924f8e197e30ab9e28d82fea (diff)
downloadanaconda-75fd52271c0ae636a31f6a9377abfd909c784857.tar.gz
anaconda-75fd52271c0ae636a31f6a9377abfd909c784857.tar.xz
anaconda-75fd52271c0ae636a31f6a9377abfd909c784857.zip
first pass at displaying loaded module info
Diffstat (limited to 'loader')
-rw-r--r--loader/loader.c34
-rw-r--r--loader/modules.c11
-rw-r--r--loader/modules.h11
3 files changed, 45 insertions, 11 deletions
diff --git a/loader/loader.c b/loader/loader.c
index 0b78dfd19..9f7338870 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -182,6 +182,31 @@ static int detectHardware(moduleInfoSet modInfo,
return LOADER_OK;
}
+int manualDeviceCheck(moduleInfoSet modInfo, moduleList modLoaded,
+ moduleDeps modDeps, struct knownDevices * kd, int flags) {
+ int rc, i;
+ char buf[2000] = "";
+ struct moduleInfo * mi;
+
+ for (i = 0; i < modLoaded->numModules; i++) {
+ if (!modLoaded->mods[i].weLoaded) continue;
+
+ strcat(buf, "\t");
+
+ if ((mi = isysFindModuleInfo(modInfo, modLoaded->mods[i].name))) {
+ strcat(buf, mi->description);
+ } else {
+ strcat(buf, modLoaded->mods[i].name);
+ }
+
+ strcat(buf, "\n");
+ }
+
+ newtWinMessage(_("Devices"), _("Ok"),
+ ("I know about the following devices on your system:\n\n %s"),
+ buf);
+}
+
int pciProbe(moduleInfoSet modInfo, moduleList modLoaded, moduleDeps modDeps,
int justProbe, struct knownDevices * kd, int flags) {
int i;
@@ -344,6 +369,11 @@ static int mountNfsImage(char * location, struct knownDevices * kd,
break;
case NFS_STAGE_MOUNT:
+ if (FL_TESTING(flags)) {
+ stage = NFS_STAGE_DONE;
+ break;
+ }
+
mlLoadModule("nfs", modLoaded, modDeps, NULL, flags);
fullPath = alloca(strlen(host) + strlen(dir) + 2);
sprintf(fullPath, "%s:%s", host, dir);
@@ -559,6 +589,10 @@ int main(int argc, char ** argv) {
}
pciProbe(modInfo, modLoaded, modDeps, 0, &kd, flags);
+ if (access("/proc/pci", X_OK) || FL_EXPERT(flags)) {
+ manualDeviceCheck(modInfo, modLoaded, modDeps, &kd, flags);
+ }
+
if (!FL_TESTING(flags)) {
int fd;
diff --git a/loader/modules.c b/loader/modules.c
index 7bf14a644..3ffba7fba 100644
--- a/loader/modules.c
+++ b/loader/modules.c
@@ -17,17 +17,6 @@ struct moduleDependency_s {
char ** deps;
};
-struct loadedModuleInfo {
- char * name;
- char ** args;
- int weLoaded;
-};
-
-struct moduleList_s {
- struct loadedModuleInfo mods[50];
- int numModules;
-};
-
int mlReadLoadedList(moduleList * mlp) {
int fd;
char * start;
diff --git a/loader/modules.h b/loader/modules.h
index 869c1fc36..ff458f13f 100644
--- a/loader/modules.h
+++ b/loader/modules.h
@@ -4,6 +4,17 @@
typedef struct moduleList_s * moduleList;
typedef struct moduleDependency_s * moduleDeps;
+struct loadedModuleInfo {
+ char * name;
+ char ** args;
+ int weLoaded;
+};
+
+struct moduleList_s {
+ struct loadedModuleInfo mods[50];
+ int numModules;
+};
+
int mlReadLoadedList(moduleList * list);
void mlFreeList(moduleList list);
int mlLoadDeps(moduleDeps * moduleDepList, const char * path);