diff options
author | 2007-06-20 18:15:43 +0000 | |
---|---|---|
committer | 2007-06-20 18:15:43 +0000 | |
commit | c326f117376551b79ce73d7cceafef3cc69e5a5b (patch) | |
tree | b433a35b9c6c80c0945dfe897df03127f92fa806 /sys/dev/isa/mcd.c | |
parent | Better recovery when osiop goes nuts and spits (diff) | |
download | wireguard-openbsd-c326f117376551b79ce73d7cceafef3cc69e5a5b.tar.xz wireguard-openbsd-c326f117376551b79ce73d7cceafef3cc69e5a5b.zip |
b_cylinder does not need to be set on the callpath down into drivers.
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
Diffstat (limited to 'sys/dev/isa/mcd.c')
-rw-r--r-- | sys/dev/isa/mcd.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c index c9c31be7bf9..7e741776f77 100644 --- a/sys/dev/isa/mcd.c +++ b/sys/dev/isa/mcd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcd.c,v 1.48 2007/06/18 20:55:52 deraadt Exp $ */ +/* $OpenBSD: mcd.c,v 1.49 2007/06/20 18:15:46 deraadt Exp $ */ /* $NetBSD: mcd.c,v 1.60 1998/01/14 12:14:41 drochner Exp $ */ /* @@ -217,8 +217,7 @@ struct cfdriver mcd_cd = { NULL, "mcd", DV_DISK }; -void mcdgetdisklabel(dev_t, struct mcd_softc *, struct disklabel *, - struct cpu_disklabel *, int); +void mcdgetdisklabel(dev_t, struct mcd_softc *, struct disklabel *, int); int mcd_get_parms(struct mcd_softc *); void mcdstrategy(struct buf *); void mcdstart(struct mcd_softc *); @@ -387,8 +386,7 @@ mcdopen(dev, flag, fmt, p) goto bad2; /* Fabricate a disk label. */ - mcdgetdisklabel(dev, sc, sc->sc_dk.dk_label, - sc->sc_dk.dk_cpulabel, 0); + mcdgetdisklabel(dev, sc, sc->sc_dk.dk_label, 0); } } @@ -511,7 +509,6 @@ mcdstrategy(bp) */ if (DISKPART(bp->b_dev) != RAW_PART && bounds_check_with_label(bp, sc->sc_dk.dk_label, - sc->sc_dk.dk_cpulabel, (sc->flags & (MCDF_WLABEL|MCDF_LABELLING)) != 0) <= 0) goto done; @@ -632,7 +629,7 @@ mcdioctl(dev, cmd, addr, flag, p) switch (cmd) { case DIOCRLDINFO: lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK); - mcdgetdisklabel(dev, sc, lp, sc->sc_dk.dk_cpulabel, 0); + mcdgetdisklabel(dev, sc, lp, 0); bcopy(lp, sc->sc_dk.dk_label, sizeof(*lp)); free(lp, M_TEMP); return 0; @@ -658,8 +655,7 @@ mcdioctl(dev, cmd, addr, flag, p) sc->flags |= MCDF_LABELLING; error = setdisklabel(sc->sc_dk.dk_label, - (struct disklabel *)addr, /*sc->sc_dk.dk_openmask : */0, - sc->sc_dk.dk_cpulabel); + (struct disklabel *)addr, /*sc->sc_dk.dk_openmask : */0); if (error == 0) { } @@ -733,17 +729,15 @@ mcdioctl(dev, cmd, addr, flag, p) } void -mcdgetdisklabel(dev, sc, lp, clp, spoofonly) +mcdgetdisklabel(dev, sc, lp, spoofonly) dev_t dev; struct mcd_softc *sc; struct disklabel *lp; - struct cpu_disklabel *clp; int spoofonly; { char *errstring; bzero(lp, sizeof(struct disklabel)); - bzero(clp, sizeof(struct cpu_disklabel)); lp->d_secsize = sc->blksize; lp->d_ntracks = 1; @@ -770,8 +764,7 @@ mcdgetdisklabel(dev, sc, lp, clp, spoofonly) /* * Call the generic disklabel extraction routine */ - errstring = readdisklabel(DISKLABELDEV(dev), mcdstrategy, lp, clp, - spoofonly); + errstring = readdisklabel(DISKLABELDEV(dev), mcdstrategy, lp, spoofonly); if (errstring) { /*printf("%s: %s\n", sc->sc_dev.dv_xname, errstring);*/ return; |