summaryrefslogtreecommitdiff
path: root/sys/dev/vinum
diff options
context:
space:
mode:
authorGreg Lehey <grog@FreeBSD.org>2003-05-05 08:41:53 +0000
committerGreg Lehey <grog@FreeBSD.org>2003-05-05 08:41:53 +0000
commit63deaeffacaed86b9fa2d72fef5077135b886216 (patch)
tree2bfa83f1214fbf38f266d86e71a7e2aea0e146b8 /sys/dev/vinum
parent0195276f54abd76234772dc0c8038f6b7eb501b9 (diff)
Notes
Diffstat (limited to 'sys/dev/vinum')
-rw-r--r--sys/dev/vinum/vinumioctl.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/dev/vinum/vinumioctl.c b/sys/dev/vinum/vinumioctl.c
index 911470fa16d9..58dce713e0cd 100644
--- a/sys/dev/vinum/vinumioctl.c
+++ b/sys/dev/vinum/vinumioctl.c
@@ -87,6 +87,14 @@ vinumioctl(dev_t dev,
sd = &SD[objno];
switch (cmd) {
+ case DIOCGSECTORSIZE:
+ *(u_int *) data = sd->sectorsize;
+ return 0;
+
+ case DIOCGMEDIASIZE:
+ *(u_int64_t *) data = sd->sectors * sd->sectorsize;
+ return 0;
+
/*
* We don't have this stuff on hardware,
* so just pretend to do it so that
@@ -108,6 +116,14 @@ vinumioctl(dev_t dev,
plex = &PLEX[objno];
switch (cmd) {
+ case DIOCGSECTORSIZE:
+ *(u_int64_t *) data = plex->sectorsize;
+ return 0;
+
+ case DIOCGMEDIASIZE:
+ *(u_int64_t *) data = plex->length * plex->sectorsize;
+ return 0;
+
/*
* We don't have this stuff on hardware,
* so just pretend to do it so that
@@ -133,6 +149,14 @@ vinumioctl(dev_t dev,
return EIO; /* I/O error */
switch (cmd) {
+ case DIOCGSECTORSIZE:
+ *(u_int *) data = vol->sectorsize;
+ return 0;
+
+ case DIOCGMEDIASIZE:
+ *(u_int64_t *) data = vol->size * vol->sectorsize;
+ return 0;
+
/*
* We don't have this stuff on hardware,
* so just pretend to do it so that