From 72c18743213c36e3f43c740e4ad293fc851ddf9f Mon Sep 17 00:00:00 2001 From: joerg Date: Wed, 14 Aug 2002 09:28:19 +0000 Subject: [PATCH] Implement the DIOCGSECTORSIZE and DIOCGMEDIASIZE ioctls, and rename the DIOCGDINFO ioctl into DIOCGDVIRGIN. This allows the newfs(8) to work on vinum volumes without the now removed -v option. Approved by: grog --- sys/dev/vinum/vinumioctl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/dev/vinum/vinumioctl.c b/sys/dev/vinum/vinumioctl.c index 3eaab40dbc51..b626b1ebb8bb 100644 --- a/sys/dev/vinum/vinumioctl.c +++ b/sys/dev/vinum/vinumioctl.c @@ -384,10 +384,18 @@ vinumioctl(dev_t dev, return EIO; /* I/O error */ switch (cmd) { - case DIOCGDINFO: /* get disk label */ + case DIOCGDVIRGIN: /* get disk label */ get_volume_label(vol->name, vol->plexes, vol->size, (struct disklabel *) data); break; + case DIOCGMEDIASIZE: + *(off_t *)data = vol->size << DEV_BSHIFT; + break; + + case DIOCGSECTORSIZE: + *(u_int *)data = DEV_BSIZE; + break; + /* * We don't have this stuff on hardware, * so just pretend to do it so that