summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>2002-08-14 09:28:19 +0000
committerjoerg <joerg@FreeBSD.org>2002-08-14 09:28:19 +0000
commit72c18743213c36e3f43c740e4ad293fc851ddf9f (patch)
tree9e0cd5ea4af1001cdeb8ed3e7f24b324fd34bf0d
parent8c01a595e79e9675fad36ea1a83b8157c1a868a3 (diff)
downloadFreeBSD-src-72c18743213c36e3f43c740e4ad293fc851ddf9f.zip
FreeBSD-src-72c18743213c36e3f43c740e4ad293fc851ddf9f.tar.gz
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
-rw-r--r--sys/dev/vinum/vinumioctl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/vinum/vinumioctl.c b/sys/dev/vinum/vinumioctl.c
index 3eaab40..b626b1e 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
OpenPOWER on IntegriCloud