mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 23:02:02 -04:00
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:
parent
4f81ef5056
commit
361854f773
1 changed files with 2 additions and 2 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue