summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-raid.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ata/ata-raid.c')
-rw-r--r--sys/dev/ata/ata-raid.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/dev/ata/ata-raid.c b/sys/dev/ata/ata-raid.c
index b209c1d..ec920e0 100644
--- a/sys/dev/ata/ata-raid.c
+++ b/sys/dev/ata/ata-raid.c
@@ -470,16 +470,11 @@ static int
aropen(dev_t dev, int flags, int fmt, struct thread *td)
{
struct ar_softc *rdp = dev->si_drv1;
- struct disklabel *dl;
- dl = &rdp->disk.d_label;
- bzero(dl, sizeof *dl);
- dl->d_secsize = DEV_BSIZE;
- dl->d_nsectors = rdp->sectors;
- dl->d_ntracks = rdp->heads;
- dl->d_ncylinders = rdp->cylinders;
- dl->d_secpercyl = rdp->sectors * rdp->heads;
- dl->d_secperunit = rdp->total_sectors;
+ rdp->disk.d_sectorsize = DEV_BSIZE;
+ rdp->disk.d_mediasize = (off_t)rdp->total_sectors * DEV_BSIZE;
+ rdp->disk.d_fwsectors = rdp->sectors;
+ rdp->disk.d_fwheads = rdp->heads;
return 0;
}
OpenPOWER on IntegriCloud