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:
Joerg Wunsch 2002-08-14 09:28:19 +00:00
parent 13a705e1d1
commit d718f8d486

View File

@ -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