diff options
author | Antoine Ginies <aginies@mandriva.com> | 2010-11-22 09:25:47 +0000 |
---|---|---|
committer | Antoine Ginies <aginies@mandriva.com> | 2010-11-22 09:25:47 +0000 |
commit | cd05539edee4c0a358b244239022eb6c4f73b58b (patch) | |
tree | 135b3379d0bbceda53ba405541d3a54cdc0cf4f5 | |
parent | 56fee43e7e0726b419c0e0b7afca9532c7d07bb1 (diff) | |
download | drakx-cd05539edee4c0a358b244239022eb6c4f73b58b.tar drakx-cd05539edee4c0a358b244239022eb6c4f73b58b.tar.gz drakx-cd05539edee4c0a358b244239022eb6c4f73b58b.tar.bz2 drakx-cd05539edee4c0a358b244239022eb6c4f73b58b.tar.xz drakx-cd05539edee4c0a358b244239022eb6c4f73b58b.zip |
fix installing from hard drive on cciss (#57973)distro/mes5
-rw-r--r-- | mdk-stage1/NEWS | 3 | ||||
-rw-r--r-- | mdk-stage1/probing.c | 34 |
2 files changed, 21 insertions, 16 deletions
diff --git a/mdk-stage1/NEWS b/mdk-stage1/NEWS index c88d6af7d..608e5d60b 100644 --- a/mdk-stage1/NEWS +++ b/mdk-stage1/NEWS @@ -1,3 +1,6 @@ +1.32.2: +- fix installing from hard drive on cciss (#57973) + 1.32.1: - handle virtio diff --git a/mdk-stage1/probing.c b/mdk-stage1/probing.c index 334d0f7b7..fd0f39c50 100644 --- a/mdk-stage1/probing.c +++ b/mdk-stage1/probing.c @@ -798,26 +798,28 @@ void find_media(enum media_bus bus) "/proc/array/ida", "/proc/cciss/cciss", // 2.2 style NULL }; static char cpq_descr[] = "Compaq RAID logical disk"; - char ** procfile = procfiles; + char ** procfile; FILE * f; - while (procfile && *procfile && (f = fopen(*procfile, "rb"))) { - while (fgets(buf, sizeof(buf), f)) { - if (ptr_begins_static_str(buf, "ida/") || ptr_begins_static_str(buf, "cciss/")) { - char * end = strchr(buf, ':'); - if (!end) - log_message("Inconsistency in %s, line:\n%s", *procfile, buf); - else { - *end = '\0'; - tmp[count].name = strdup(buf); - tmp[count].type = DISK; - tmp[count].model = cpq_descr; - log_message("CPQ: found %s", tmp[count].name); - count++; + + for (procfile = procfiles; procfile && *procfile; procfile++) { + if((f = fopen(*procfile, "rb"))) { + while (fgets(buf, sizeof(buf), f)) { + if (ptr_begins_static_str(buf, "ida/") || ptr_begins_static_str(buf, "cciss/")) { + char * end = strchr(buf, ':'); + if (!end) + log_message("Inconsistency in %s, line:\n%s", *procfile, buf); + else { + *end = '\0'; + tmp[count].name = strdup(buf); + tmp[count].type = DISK; + tmp[count].model = cpq_descr; + log_message("CPQ: found %s", tmp[count].name); + count++; + } } } + fclose(f); } - fclose(f); - procfile++; } } |