diff options
author | Matt Wilson <msw@redhat.com> | 2000-02-04 19:45:33 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-02-04 19:45:33 +0000 |
commit | e3eeadec68901ffcb1ba2a8e498205aab801bfbc (patch) | |
tree | 9240c2b085597e876a2752f945f696b682517cfc | |
parent | 2eddf754efadbf1fe18a13e1b1ad9840346eaf9c (diff) | |
download | anaconda-e3eeadec68901ffcb1ba2a8e498205aab801bfbc.tar.gz anaconda-e3eeadec68901ffcb1ba2a8e498205aab801bfbc.tar.xz anaconda-e3eeadec68901ffcb1ba2a8e498205aab801bfbc.zip |
patch from hans for probe output parsing
-rw-r--r-- | loader/pcmcia.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/loader/pcmcia.c b/loader/pcmcia.c index 7eadb90ba..6895a83f4 100644 --- a/loader/pcmcia.c +++ b/loader/pcmcia.c @@ -18,7 +18,8 @@ void startPcmcia(moduleList modLoaded, moduleDeps modDeps, int flags) { int p[2]; char buf[4096]; int i, status; - char * pcic; + char * pcic = NULL; + char * line = NULL; logMessage("in startPcmcia()"); @@ -45,14 +46,23 @@ void startPcmcia(moduleList modLoaded, moduleDeps modDeps, int flags) { stops printing output once it finds a pcic, so this is actually correct */ - if (strstr(buf, "TCIC-2 probe: not found")) { + line = strtok(buf, "\r\n"); + + do { + if (!strstr(line, "not found")) + { + if (strstr(line, "TCIC")) + pcic = "tcic"; + else + pcic = "i82365"; + } + } while((line = strtok(NULL, "\r\n"))) + + if (!pcic) + { logMessage("no pcic controller found"); return; - } else if (strstr(buf, "TCIC")) - pcic = "tcic"; - else - pcic = "i82365"; - + } logMessage("need to load %s", pcic); if (mlLoadModule("pcmcia_core", NULL, modLoaded, modDeps, NULL, flags)) { |