diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-09-20 19:36:05 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-09-20 19:36:05 +0000 |
| commit | 7812d86f03dbed973e20eee5da963ae5efc666c4 (patch) | |
| tree | 47b5afae3623c1371d19a0478c850d8e6a08d07b /sys/dev/ofw/ofw_disk.c | |
| parent | 5741a42f2f25ab4f5bff0b8f213cbb93aae1b5ac (diff) | |
Notes
Diffstat (limited to 'sys/dev/ofw/ofw_disk.c')
| -rw-r--r-- | sys/dev/ofw/ofw_disk.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sys/dev/ofw/ofw_disk.c b/sys/dev/ofw/ofw_disk.c index 878e8e88a088..8262e0f4fb72 100644 --- a/sys/dev/ofw/ofw_disk.c +++ b/sys/dev/ofw/ofw_disk.c @@ -114,24 +114,16 @@ static int ofwd_open(dev_t dev, int flags, int fmt, struct thread *td) { struct ofwd_softc *sc; - struct disklabel *label; sc = (struct ofwd_softc *)dev->si_drv1; if (sc == NULL) return (ENXIO); - /* - * Build synthetic label. - */ - label = &sc->ofwd_disk.d_label; - bzero(label, sizeof(*label)); - label->d_type = DTYPE_ESDI; - label->d_secsize = OFWD_BLOCKSIZE; - label->d_nsectors = 33554432; - label->d_ntracks = 1; - label->d_ncylinders = 1024; - label->d_secpercyl = 32768; - label->d_secperunit = 33554432; + sc->ofwd_disk.d_sectorsize = OFWD_BLOCKSIZE; + sc->ofwd_disk.d_mediasize = (off_t)33554432 * OFWD_BLOCKSIZE; + /* XXX: probably don't need the next two */ + sc->ofwd_disk.d_fwsectors = 33554432; + sc->ofwd_disk.d_fwheads = 1 sc->ofwd_flags |= OFWD_OPEN; return (0); |
