From b9742d01f45e7a020359cfc0ea3245fea2d5558d Mon Sep 17 00:00:00 2001 From: Greg Lehey Date: Mon, 2 Dec 2002 23:56:59 +0000 Subject: [PATCH] Implement DIOCGDINFO for volumes. newfs will no longer build a file system on a volume without a disk label. Approved by: re (rwatson) --- sys/dev/vinum/vinumioctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/vinum/vinumioctl.c b/sys/dev/vinum/vinumioctl.c index fdfc8f632b7..692309dd7c8 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;