Change an arbitarly hardcoded `10' to MAX_NO_DISKS, which is currently "20".

Otherwise can't see sd10 (obtained using wired down sd unit numbers),
reguardless of the number of actual disks you have.
This commit is contained in:
David E. O'Brien 1998-05-15 21:17:01 +00:00
parent 4f81ef5056
commit 361854f773

View file

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
* $Id: disk.c,v 1.32 1998/03/20 23:43:04 jkh Exp $
* $Id: disk.c,v 1.33 1998/03/22 07:41:23 jkh Exp $
*
*/
@ -306,7 +306,7 @@ Disk_Names()
memset(disks,0,sizeof *disks * (1 + MAX_NO_DISKS));
k = 0;
for (j = 0; device_list[j]; j++) {
for (i = 0; i < 10; i++) {
for (i = 0; i < MAX_NO_DISKS; i++) {
sprintf(diskname, "%s%d", device_list[j], i);
sprintf(disk, "/dev/r%s", diskname);
if (stat(disk, &st) || !(st.st_mode & S_IFCHR))