summaryrefslogtreecommitdiffstats
path: root/sys/dev/vinum
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2002-12-02 23:56:59 +0000
committergrog <grog@FreeBSD.org>2002-12-02 23:56:59 +0000
commite70e70c250359ed2e7072c2b89a82cb0ec9780b0 (patch)
tree876f7331ee2010f67bcf038e0fe043e650b85b4c /sys/dev/vinum
parent4b6244d58e1258cd34e2711e673e0977792ab7ae (diff)
downloadFreeBSD-src-e70e70c250359ed2e7072c2b89a82cb0ec9780b0.zip
FreeBSD-src-e70e70c250359ed2e7072c2b89a82cb0ec9780b0.tar.gz
Implement DIOCGDINFO for volumes. newfs will no longer build a file
system on a volume without a disk label. Approved by: re (rwatson)
Diffstat (limited to 'sys/dev/vinum')
-rw-r--r--sys/dev/vinum/vinumioctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/vinum/vinumioctl.c b/sys/dev/vinum/vinumioctl.c
index fdfc8f6..692309d 100644
--- a/sys/dev/vinum/vinumioctl.c
+++ b/sys/dev/vinum/vinumioctl.c
@@ -389,6 +389,10 @@ vinumioctl(dev_t dev,
*(off_t *)data = vol->size << DEV_BSHIFT;
break;
+ case DIOCGDINFO: /* get disk label */
+ get_volume_label(vol->name, 1, vol->size, (struct disklabel *) data);
+ break;
+
case DIOCGSECTORSIZE:
*(u_int *)data = DEV_BSIZE;
break;
OpenPOWER on IntegriCloud