summaryrefslogtreecommitdiffstats
path: root/isys/silo.c
diff options
context:
space:
mode:
authorjakub <jakub>1999-10-05 14:54:38 +0000
committerjakub <jakub>1999-10-05 14:54:38 +0000
commit2a9944ed56ea50f7fc5e2ddc24402196ced507a6 (patch)
tree1e0a97bd9cd1d003ca87b23c561f757a04d134f9 /isys/silo.c
parent579f6434c5f9b69d7f67cb2e6588cdbce1c2149a (diff)
downloadanaconda-2a9944ed56ea50f7fc5e2ddc24402196ced507a6.tar.gz
anaconda-2a9944ed56ea50f7fc5e2ddc24402196ced507a6.tar.xz
anaconda-2a9944ed56ea50f7fc5e2ddc24402196ced507a6.zip
Accept NCR scsi style prom paths (ie. /disk@0,0 instead of /sd@0,0), be more
robust for future weird SCSI block device names. Disk itself (ie. device name without digits) maps into :c in v2+ paths.
Diffstat (limited to 'isys/silo.c')
-rw-r--r--isys/silo.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/isys/silo.c b/isys/silo.c
index ee229a75c..a300b1058 100644
--- a/isys/silo.c
+++ b/isys/silo.c
@@ -258,16 +258,27 @@ scan_walk_callback(int node) {
break;
case SDSK_TYPE_SD:
for (nextnode = prom_getchild(node); nextnode; nextnode = prom_getsibling(nextnode)) {
- prop = prom_getproperty("name", &len);
+ prop = prom_getproperty("compatible", &len);
if (prop && len > 0 && !strcmp (prop, "sd"))
break;
+ prop = prom_getproperty("name", &len);
+ if (prop && len > 0 && (!strcmp (prop, "sd") || !strcmp (prop, "disk")))
+ break;
}
if (!nextnode || hd[disk].hi)
continue;
- if (!promvers)
+ if (promvers) {
+ char name[1024];
+ prop = prom_getproperty("name", &len);
+ if (prop && len > 0)
+ strcpy (name, prop);
+ else
+ strcpy (name, "sd");
+ if (!prop)
+ prop = ((struct openpromio *)buf)->oprom_array;
+ sprintf (prop, "/%s@%d,%d", name, hd[disk].mid, hd[disk].lo);
+ } else
sprintf (prop, "sd(%d,%d,", v0ctrl, hd[disk].mid);
- else
- sprintf (prop, "/sd@%d,%d", hd[disk].mid, hd[disk].lo);
break;
case SDSK_TYPE_PLN:
sprintf (prop, "/SUNW,pln@%x,%x/SUNW,ssd@%d,%d",
@@ -716,7 +727,7 @@ disk2PromPath (PyObject *self, PyObject *args)
if (diskno == -1)
part = -1;
else if (!disk[0])
- part = 0;
+ part = 3;
else {
part = atoi (disk);
if (part <= 0 || part > 8) part = -1;