mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
ad3507f645
commit
b9742d01f4
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Reference in a new issue