mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-23 16:01:42 +00:00
Don't use kern.disks sysctl on PC-98 because the wd driver doesn't call
disk_create() function.
This commit is contained in:
parent
d30693998e
commit
ce7ca0624c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=64324
@ -456,12 +456,15 @@ Disk_Names()
|
||||
struct diskslices ds;
|
||||
int fd;
|
||||
static char **disks;
|
||||
#ifndef PC98
|
||||
int error;
|
||||
size_t listsize;
|
||||
char *disklist, **dp;
|
||||
#endif
|
||||
|
||||
disks = malloc(sizeof *disks * (1 + MAX_NO_DISKS));
|
||||
memset(disks,0,sizeof *disks * (1 + MAX_NO_DISKS));
|
||||
#ifndef PC98
|
||||
error = sysctlbyname("kern.disks", NULL, &listsize, NULL, 0);
|
||||
if (!error) {
|
||||
disklist = (char *)malloc(listsize);
|
||||
@ -473,6 +476,7 @@ Disk_Names()
|
||||
return disks;
|
||||
}
|
||||
warn("kern.disks sysctl not available");
|
||||
#endif
|
||||
k = 0;
|
||||
for (j = 0; device_list[j]; j++) {
|
||||
for (i = 0; i < MAX_NO_DISKS; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user