summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/probing.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-10-08 14:07:33 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-10-08 14:07:33 +0000
commit3dc82ede70cb9f1ca6b26ee9c286127043779e73 (patch)
tree1266bb8a76bb020f47757188286801bbb89ff0d9 /mdk-stage1/probing.c
parent7df0d97b9467aa28ad554dc426a99789df71bbc4 (diff)
downloaddrakx-3dc82ede70cb9f1ca6b26ee9c286127043779e73.tar
drakx-3dc82ede70cb9f1ca6b26ee9c286127043779e73.tar.gz
drakx-3dc82ede70cb9f1ca6b26ee9c286127043779e73.tar.bz2
drakx-3dc82ede70cb9f1ca6b26ee9c286127043779e73.tar.xz
drakx-3dc82ede70cb9f1ca6b26ee9c286127043779e73.zip
*** empty log message ***
Diffstat (limited to 'mdk-stage1/probing.c')
-rw-r--r--mdk-stage1/probing.c37
1 files changed, 31 insertions, 6 deletions
diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c
index 664ab159f..3390636e2 100644
--- a/mdk-stage1/probing.c
+++ b/mdk-stage1/probing.c
@@ -53,13 +53,10 @@
#include "probing.h"
-enum bus_type { IDE, SCSI, CPQ };
-
struct media_info {
char * name;
char * model;
enum media_type type;
- enum bus_type bus;
};
@@ -379,7 +376,6 @@ static void find_media(void)
close(fd);
log_message("IDE/%d: %s is a %s", tmp[count].type, tmp[count].name, tmp[count].model);
- tmp[count].bus = IDE;
count++;
}
@@ -496,7 +492,6 @@ static void find_media(void)
if (*tmp_name) {
tmp[count].name = strdup(tmp_name);
log_message("SCSI/%d: %s is a %s", tmp[count].type, tmp[count].name, tmp[count].model);
- tmp[count].bus = SCSI;
count++;
}
@@ -530,7 +525,6 @@ static void find_media(void)
tmp[count].type = DISK;
tmp[count].model = cpq_descr;
log_message("CPQ: found %s", tmp[count].name);
- tmp[count].bus = CPQ;
count++;
}
}
@@ -541,6 +535,37 @@ static void find_media(void)
}
/* ----------------------------------------------- */
+ log_message("looking for DAC960");
+ {
+ FILE * f;
+ if ((f = fopen("/tmp/syslog", "rb"))) {
+ while (fgets(buf, sizeof(buf), f)) {
+ char * start;
+ if ((start = strstr(buf, "/dev/rd/"))) {
+ char * end = strchr(start, ':');
+ if (!end)
+ log_message("Inconsistency in syslog, line:\n%s", buf);
+ else {
+ *end = '\0';
+ tmp[count].name = strdup(start+5);
+ tmp[count].type = DISK;
+ start = end + 2;
+ end = strchr(start, ',');
+ if (end) {
+ *end = '\0';
+ tmp[count].model = strdup(start);
+ } else
+ tmp[count].model = "(unknown)";
+ log_message("DAC960: found %s (%s)", tmp[count].name, tmp[count].model);
+ count++;
+ }
+ }
+ }
+ fclose(f);
+ }
+ }
+
+ /* ----------------------------------------------- */
tmp[count].name = NULL;
count++;