1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00

Initialize fwsectors/fwheads to allow the DIOCGFWSECTORS and

DIOCGFWHEADS ioctls to return meaningful values to disklabel/newfs

Approved by: phk
This commit is contained in:
Peter Grehan 2002-09-22 10:07:18 +00:00
parent 320d99c058
commit a0c6726472
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103800

View File

@ -369,8 +369,8 @@ mdopen(dev_t dev, int flag, int fmt, struct thread *td)
sc->disk.d_sectorsize = sc->secsize;
sc->disk.d_mediasize = (off_t)sc->nsect * sc->secsize;
sc->disk.d_fwsectors = 0;
sc->disk.d_fwheads = 0;
sc->disk.d_fwsectors = sc->nsect > 63 ? 63 : sc->nsect;
sc->disk.d_fwheads = 1;
sc->opencount++;
return (0);
}