Retire now unused DIOCGDVIRGIN kludge.

Sponsored by:	DARPA & NAI Labs.
This commit is contained in:
Poul-Henning Kamp 2002-09-20 09:31:14 +00:00
parent b9d05a16f4
commit 46714777f5
6 changed files with 0 additions and 44 deletions

View File

@ -384,9 +384,6 @@ vinumioctl(dev_t dev,
return EIO; /* I/O error */
switch (cmd) {
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;

View File

@ -297,11 +297,6 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
break;
}
if (error != 0 && cmd == DIOCGDVIRGIN) {
g_topology_lock();
gp = g_create_geomf("BSD", cp->provider, NULL);
g_topology_unlock();
}
PICKUP_GIANT();
g_waitidle();
if (error == ENOIOCTL) {

View File

@ -371,39 +371,6 @@ dsioctl(dev, cmd, data, flags, sspp)
*(struct disklabel *)data = *lp;
return (0);
case DIOCGDVIRGIN:
lp = (struct disklabel *)data;
if (ssp->dss_slices[WHOLE_DISK_SLICE].ds_label) {
*lp = *ssp->dss_slices[WHOLE_DISK_SLICE].ds_label;
} else {
bzero(lp, sizeof(struct disklabel));
}
lp->d_magic = DISKMAGIC;
lp->d_magic2 = DISKMAGIC;
pp = &lp->d_partitions[RAW_PART];
pp->p_offset = 0;
pp->p_size = sp->ds_size;
lp->d_npartitions = MAXPARTITIONS;
if (lp->d_interleave == 0)
lp->d_interleave = 1;
if (lp->d_rpm == 0)
lp->d_rpm = 3600;
if (lp->d_nsectors == 0)
lp->d_nsectors = 32;
if (lp->d_ntracks == 0)
lp->d_ntracks = 64;
lp->d_bbsize = BBSIZE;
lp->d_sbsize = 0;
lp->d_secpercyl = lp->d_nsectors * lp->d_ntracks;
lp->d_ncylinders = sp->ds_size / lp->d_secpercyl;
lp->d_secperunit = sp->ds_size;
lp->d_checksum = 0;
lp->d_checksum = dkcksum(lp);
return (0);
case DIOCGMEDIASIZE:
if (lp == NULL)
*(off_t *)data = (off_t)sp->ds_size * ssp->dss_secsize;

View File

@ -355,7 +355,6 @@ CTASSERT(sizeof (struct dos_partition) == 16);
#define DIOCGDINFO _IOR('d', 101, struct disklabel)/* get */
#define DIOCSDINFO _IOW('d', 102, struct disklabel)/* set */
#define DIOCWDINFO _IOW('d', 103, struct disklabel)/* set, update disk */
#define DIOCGDVIRGIN _IOR('d', 105, struct disklabel)/* get virgin label */
#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */

View File

@ -355,7 +355,6 @@ CTASSERT(sizeof (struct dos_partition) == 16);
#define DIOCGDINFO _IOR('d', 101, struct disklabel)/* get */
#define DIOCSDINFO _IOW('d', 102, struct disklabel)/* set */
#define DIOCWDINFO _IOW('d', 103, struct disklabel)/* set, update disk */
#define DIOCGDVIRGIN _IOR('d', 105, struct disklabel)/* get virgin label */
#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */

View File

@ -355,7 +355,6 @@ CTASSERT(sizeof (struct dos_partition) == 16);
#define DIOCGDINFO _IOR('d', 101, struct disklabel)/* get */
#define DIOCSDINFO _IOW('d', 102, struct disklabel)/* set */
#define DIOCWDINFO _IOW('d', 103, struct disklabel)/* set, update disk */
#define DIOCGDVIRGIN _IOR('d', 105, struct disklabel)/* get virgin label */
#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */