diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-20 18:15:48 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-20 18:15:48 +0000 |
commit | 873db335f698dc92ad5bb1724185b94b78cadc90 (patch) | |
tree | 5d88760d74825983a6db073cbf8f2208063bb6cc /sys/arch/sparc/dev | |
parent | fca02c516c82caf63d1f863db7e8b1b418f4cb66 (diff) |
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/arch/sparc/dev')
-rw-r--r-- | sys/arch/sparc/dev/fd.c | 12 | ||||
-rw-r--r-- | sys/arch/sparc/dev/presto.c | 18 |
2 files changed, 10 insertions, 20 deletions
diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c index c36b5b439fc..a25708f3bfb 100644 --- a/sys/arch/sparc/dev/fd.c +++ b/sys/arch/sparc/dev/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.53 2007/06/08 05:27:58 deraadt Exp $ */ +/* $OpenBSD: fd.c,v 1.54 2007/06/20 18:15:47 deraadt Exp $ */ /* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */ /*- @@ -1786,14 +1786,12 @@ fdioctl(dev, cmd, addr, flag, p) return (EBADF); error = setdisklabel(fd->sc_dk.dk_label, - (struct disklabel *)addr, 0, - fd->sc_dk.dk_cpulabel); + (struct disklabel *)addr, 0); if (error) return (error); error = writedisklabel(DISKLABELDEV(dev), fdstrategy, - fd->sc_dk.dk_label, - fd->sc_dk.dk_cpulabel); + fd->sc_dk.dk_label); return (error); case DIOCLOCK: @@ -1952,11 +1950,9 @@ fdgetdisklabel(dev) int unit = FDUNIT(dev); struct fd_softc *fd = fd_cd.cd_devs[unit]; struct disklabel *lp = fd->sc_dk.dk_label; - struct cpu_disklabel *clp = fd->sc_dk.dk_cpulabel; char *errstring; bzero(lp, sizeof(struct disklabel)); - bzero(clp, sizeof(struct cpu_disklabel)); lp->d_type = DTYPE_FLOPPY; lp->d_secsize = FD_BSIZE(fd); @@ -1979,7 +1975,7 @@ fdgetdisklabel(dev) /* * Call the generic disklabel extraction routine. */ - errstring = readdisklabel(DISKLABELDEV(dev), fdstrategy, lp, clp, 0); + errstring = readdisklabel(DISKLABELDEV(dev), fdstrategy, lp, 0); if (errstring) { /*printf("%s: %s\n", fd->sc_dv.dv_xname, errstring);*/ } diff --git a/sys/arch/sparc/dev/presto.c b/sys/arch/sparc/dev/presto.c index 65eb065472e..2311511d627 100644 --- a/sys/arch/sparc/dev/presto.c +++ b/sys/arch/sparc/dev/presto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: presto.c,v 1.12 2007/06/15 02:28:49 todd Exp $ */ +/* $OpenBSD: presto.c,v 1.13 2007/06/20 18:15:47 deraadt Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved. @@ -294,8 +294,7 @@ prestostrategy(struct buf *bp) /* Do not write on "no trespassing" areas... */ part = DISKPART(bp->b_dev); if (part != RAW_PART && - bounds_check_with_label(bp, sc->sc_dk.dk_label, - sc->sc_dk.dk_cpulabel, 1) <= 0) + bounds_check_with_label(bp, sc->sc_dk.dk_label, 1) <= 0) goto bad; /* Bound the request size, then move data between buf and nvram */ @@ -341,8 +340,7 @@ prestoioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *proc) return (EBADF); error = setdisklabel(sc->sc_dk.dk_label, - (struct disklabel *)data, /*sd->sc_dk.dk_openmask : */0, - sc->sc_dk.dk_cpulabel); + (struct disklabel *)data, /*sd->sc_dk.dk_openmask : */0); return (error); case DIOCWDINFO: @@ -350,12 +348,10 @@ prestoioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *proc) return (EBADF); error = setdisklabel(sc->sc_dk.dk_label, - (struct disklabel *)data, /*sd->sc_dk.dk_openmask : */0, - sc->sc_dk.dk_cpulabel); + (struct disklabel *)data, /*sd->sc_dk.dk_openmask : */0); if (error == 0) { error = writedisklabel(DISKLABELDEV(dev), - prestostrategy, sc->sc_dk.dk_label, - sc->sc_dk.dk_cpulabel); + prestostrategy, sc->sc_dk.dk_label); } return (error); @@ -372,7 +368,6 @@ presto_getdisklabel(dev_t dev, struct presto_softc *sc) { struct disklabel *lp = sc->sc_dk.dk_label; - bzero(sc->sc_dk.dk_cpulabel, sizeof(struct cpu_disklabel)); bzero(sc->sc_dk.dk_label, sizeof(struct disklabel)); lp->d_secsize = DEV_BSIZE; @@ -393,6 +388,5 @@ presto_getdisklabel(dev_t dev, struct presto_softc *sc) lp->d_magic2 = DISKMAGIC; lp->d_checksum = dkcksum(lp); - readdisklabel(DISKLABELDEV(dev), prestostrategy, sc->sc_dk.dk_label, - sc->sc_dk.dk_cpulabel, 0); + readdisklabel(DISKLABELDEV(dev), prestostrategy, sc->sc_dk.dk_label, 0); } |