summaryrefslogtreecommitdiffstats
path: root/lib/libdisk
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2000-08-07 02:14:44 +0000
committernyan <nyan@FreeBSD.org>2000-08-07 02:14:44 +0000
commitfb32fc5d86d0c974cd3ed9f1bd5187f412ee4683 (patch)
tree190bed19478d369b400d7624ba6d236dc670aeb3 /lib/libdisk
parent41b31bd1e0939e9fce02b9deff106c3b385eb84b (diff)
downloadFreeBSD-src-fb32fc5d86d0c974cd3ed9f1bd5187f412ee4683.zip
FreeBSD-src-fb32fc5d86d0c974cd3ed9f1bd5187f412ee4683.tar.gz
Don't use kern.disks sysctl on PC-98 because the wd driver doesn't call
disk_create() function.
Diffstat (limited to 'lib/libdisk')
-rw-r--r--lib/libdisk/disk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libdisk/disk.c b/lib/libdisk/disk.c
index a61694d..1c7d5d7 100644
--- a/lib/libdisk/disk.c
+++ b/lib/libdisk/disk.c
@@ -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++) {
OpenPOWER on IntegriCloud