mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
Implement the DIOCGSECTORSIZE and DIOCGMEDIASIZE ioctls, and rename
the DIOCGDINFO ioctl into DIOCGDVIRGIN. This allows the newfs(8) to work on vinum volumes without the now removed -v option. Approved by: grog
This commit is contained in:
parent
13a705e1d1
commit
d718f8d486
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=101860
@ -384,10 +384,18 @@ vinumioctl(dev_t dev,
|
||||
return EIO; /* I/O error */
|
||||
|
||||
switch (cmd) {
|
||||
case DIOCGDINFO: /* get disk label */
|
||||
case DIOCGDVIRGIN: /* get disk label */
|
||||
get_volume_label(vol->name, vol->plexes, vol->size, (struct disklabel *) data);
|
||||
break;
|
||||
|
||||
case DIOCGMEDIASIZE:
|
||||
*(off_t *)data = vol->size << DEV_BSHIFT;
|
||||
break;
|
||||
|
||||
case DIOCGSECTORSIZE:
|
||||
*(u_int *)data = DEV_BSIZE;
|
||||
break;
|
||||
|
||||
/*
|
||||
* We don't have this stuff on hardware,
|
||||
* so just pretend to do it so that
|
||||
|
Loading…
Reference in New Issue
Block a user