fix a bug in lib/device.c.

This commit is contained in:
okuji 2000-09-07 10:30:09 +00:00
parent af670e41f3
commit aa4e796168
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2000-09-07 OKUJI Yoshinori <okuji@gnu.org>
From Hal Snyder <hal@vailsys.com>:
* 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 <rubini@gnu.org>
* docs/tutorial.texi: Fixed a few typos and minor imprecisions.

View file

@ -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;