summaryrefslogtreecommitdiffstats
path: root/sys/dev/md
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2002-09-22 10:07:18 +0000
committergrehan <grehan@FreeBSD.org>2002-09-22 10:07:18 +0000
commit0429db72404985394332f0326307b48592c30b01 (patch)
treebb8c5a992b042e0a019d93d06702f1045b15d7e6 /sys/dev/md
parentf9ed339e30af8ede557dea2684ba7e1b8696da0c (diff)
downloadFreeBSD-src-0429db72404985394332f0326307b48592c30b01.zip
FreeBSD-src-0429db72404985394332f0326307b48592c30b01.tar.gz
Initialize fwsectors/fwheads to allow the DIOCGFWSECTORS and
DIOCGFWHEADS ioctls to return meaningful values to disklabel/newfs Approved by: phk
Diffstat (limited to 'sys/dev/md')
-rw-r--r--sys/dev/md/md.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 032c5fe..6b5431c 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -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);
}
OpenPOWER on IntegriCloud