Current cvs lib/device.c doesn't compile on OpenBSD-2.7-current.
Binutils 2.10.91.
At line 102, disks[] is undefined.
Here's a diff of something that compiles for me; it reports geometry
different from the BIOS, but consistent with drive size.
I'm only using grub for (nd) boot testing now; haven't had a chance to
test this much.
Index: lib/device.c
===================================================================
RCS file: /cvs/grub/lib/device.c,v
retrieving revision 1.5
diff -u -r1.5 device.c
--- lib/device.c 2000/08/27 11:21:25 1.5
+++ lib/device.c 2000/09/07 04:17:26
@@ -99,9 +99,10 @@
/* FreeBSD, NetBSD or OpenBSD */
{
struct disklabel hdg;
- if (ioctl (disks[drive].flags, DIOCGDINFO, &hdg))
+
+ if (ioctl (fd, DIOCGDINFO, &hdg))
goto fail;
-
+
geom->cylinders = hdg.d_ncylinders;
geom->heads = hdg.d_ntracks;
geom->sectors = hdg.d_nsectors;