diff --git a/ChangeLog b/ChangeLog index 0bf5d06ca..f0246c640 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-09-07 OKUJI Yoshinori + + From Hal Snyder : + * lib/device.c (get_drive_geometry) [__FreeBSD__ || __NetBSD__ + || __OpenBSD__]: Call ioctl for FD instead of + DISKS[DRIVE].FLAGS. This was a mistake when I segregated this + function from asmstub.c. + 2000-09-07 Alessandro Rubini * docs/tutorial.texi: Fixed a few typos and minor imprecisions. diff --git a/lib/device.c b/lib/device.c index 2c91b515c..f35b1f926 100644 --- a/lib/device.c +++ b/lib/device.c @@ -99,7 +99,7 @@ get_drive_geometry (struct geometry *geom, char **map, int drive) /* 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;