From a0c67264729389b5daa31510ae64aee6fa4cfd6d Mon Sep 17 00:00:00 2001 From: Peter Grehan Date: Sun, 22 Sep 2002 10:07:18 +0000 Subject: [PATCH] Initialize fwsectors/fwheads to allow the DIOCGFWSECTORS and DIOCGFWHEADS ioctls to return meaningful values to disklabel/newfs Approved by: phk --- sys/dev/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 032c5fe1558..6b5431c792f 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); }