From b63492a5ba32a10afd2d6fa5bd841f57b51d1499 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Thu, 22 Mar 2001 21:13:35 +0000 Subject: handle > 26 SCSI drives --- isys/probe.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'isys/probe.c') diff --git a/isys/probe.c b/isys/probe.c index 932ac16ca..5e869a67b 100644 --- a/isys/probe.c +++ b/isys/probe.c @@ -233,7 +233,7 @@ int kdFindScsiList(struct knownDevices * devices, int code) { char typebuf[10]; int i, state = SCSISCSI_TOP; char * start, * chptr, * next, *end; - char driveName = 'a'; + int driveNum = 0; char cdromNum = '0'; char tapeNum = '0'; struct kddevice device; @@ -357,7 +357,12 @@ int kdFindScsiList(struct knownDevices * devices, int code) { } *typebuf = '\0'; if (strstr(start, "Direct-Access")) { - sprintf(typebuf, "sd%c", driveName++); + if (driveNum < 26) + sprintf(typebuf, "sd%c", driveNum + 'a'); + else + sprintf(typebuf, "sd%c%c", (driveNum / 26 - 1) + 'a', + (driveNum % 26) + 'a'); + driveNum++; device.class = CLASS_HD; } else if (strstr(start, "Sequential-Access")) { sprintf(typebuf, "st%c", tapeNum++); -- cgit