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;
|
*(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;
|
||||||
|
Loading…
Reference in New Issue
Block a user