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:
parent
4b6244d58e
commit
e70e70c250
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user