Implement DIOCGDINFO for volumes. newfs will no longer build a file

system on a volume without a disk label.

Approved by: re (rwatson)
This commit is contained in:
grog 2002-12-02 23:56:59 +00:00
parent 4b6244d58e
commit e70e70c250

View File

@ -389,6 +389,10 @@ vinumioctl(dev_t dev,
*(off_t *)data = vol->size << DEV_BSHIFT; *(off_t *)data = vol->size << DEV_BSHIFT;
break; break;
case DIOCGDINFO: /* get disk label */
get_volume_label(vol->name, 1, vol->size, (struct disklabel *) data);
break;
case DIOCGSECTORSIZE: case DIOCGSECTORSIZE:
*(u_int *)data = DEV_BSIZE; *(u_int *)data = DEV_BSIZE;
break; break;