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/vax | |
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/vax')
-rw-r--r-- | sys/arch/vax/include/disklabel.h | 7 | ||||
-rw-r--r-- | sys/arch/vax/mscp/mscp_disk.c | 10 | ||||
-rw-r--r-- | sys/arch/vax/vax/disksubr.c | 9 | ||||
-rw-r--r-- | sys/arch/vax/vsa/hdc9224.c | 11 |
4 files changed, 14 insertions, 23 deletions
diff --git a/sys/arch/vax/include/disklabel.h b/sys/arch/vax/include/disklabel.h index cae29811e77..7bc0c1d5fff 100644 --- a/sys/arch/vax/include/disklabel.h +++ b/sys/arch/vax/include/disklabel.h @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.h,v 1.8 2007/06/17 00:27:28 deraadt Exp $ */ +/* $OpenBSD: disklabel.h,v 1.9 2007/06/20 18:15:45 deraadt Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -37,9 +37,4 @@ #define LABELOFFSET 64 /* offset of label in sector */ #define MAXPARTITIONS 16 /* number of partitions */ -#ifndef _LOCORE -struct cpu_disklabel { -}; - -#endif #endif /* _MACHINE_DISKLABEL_H_ */ diff --git a/sys/arch/vax/mscp/mscp_disk.c b/sys/arch/vax/mscp/mscp_disk.c index a68d996fce6..5f6fe99ea55 100644 --- a/sys/arch/vax/mscp/mscp_disk.c +++ b/sys/arch/vax/mscp/mscp_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mscp_disk.c,v 1.23 2007/06/08 05:35:31 deraadt Exp $ */ +/* $OpenBSD: mscp_disk.c,v 1.24 2007/06/20 18:15:46 deraadt Exp $ */ /* $NetBSD: mscp_disk.c,v 1.30 2001/11/13 07:38:28 lukem Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -163,7 +163,7 @@ ra_putonline(ra) ra->ra_state = DK_RDLABEL; printf("%s", ra->ra_dev.dv_xname); if ((msg = readdisklabel(MAKEDISKDEV(RAMAJOR, ra->ra_dev.dv_unit, - RAW_PART), rastrategy, dl, NULL, 0)) != NULL) { + RAW_PART), rastrategy, dl, 0)) != NULL) { /*printf(": %s", msg);*/ } else { ra->ra_havelabel = 1; @@ -320,7 +320,7 @@ rastrategy(bp) * within the boundaries of the partition. */ if (bounds_check_with_label(bp, ra->ra_disk.dk_label, - ra->ra_disk.dk_cpulabel, ra->ra_wlabel) <= 0) + ra->ra_wlabel) <= 0) goto done; /* Make some statistics... /bqt */ @@ -391,10 +391,10 @@ raioctl(dev, cmd, data, flag, p) if ((flag & FWRITE) == 0) error = EBADF; else { - error = setdisklabel(lp, tp, 0, 0); + error = setdisklabel(lp, tp, 0); if (error == 0 && cmd == DIOCWDINFO) { ra->ra_wlabel = 1; - error = writedisklabel(dev, rastrategy, lp,0); + error = writedisklabel(dev, rastrategy, lp); ra->ra_wlabel = 0; } } diff --git a/sys/arch/vax/vax/disksubr.c b/sys/arch/vax/vax/disksubr.c index b7a5e1af284..61d61929b12 100644 --- a/sys/arch/vax/vax/disksubr.c +++ b/sys/arch/vax/vax/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.52 2007/06/17 00:27:29 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.53 2007/06/20 18:15:46 deraadt Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1999/06/30 18:48:06 ragge Exp $ */ /* @@ -58,7 +58,7 @@ */ char * readdisklabel(dev_t dev, void (*strat)(struct buf *), - struct disklabel *lp, struct cpu_disklabel *osdep, int spoofonly) + struct disklabel *lp, int spoofonly) { struct buf *bp = NULL; char *msg; @@ -75,7 +75,6 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), bp->b_blkno = LABELSECTOR; bp->b_bcount = lp->d_secsize; bp->b_flags = B_BUSY | B_READ; - bp->b_cylinder = LABELSECTOR / lp->d_secpercyl; (*strat)(bp); if (biowait(bp)) { msg = "I/O error"; @@ -112,8 +111,7 @@ done: * Always allow writing of disk label; even if the disk is unlabeled. */ int -writedisklabel(dev_t dev, void (*strat)(struct buf *), - struct disklabel *lp, struct cpu_disklabel *osdep) +writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) { struct buf *bp = NULL; struct disklabel *dlp; @@ -124,7 +122,6 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), /* Read it in, slap the new label in, and write it back out */ bp->b_blkno = LABELSECTOR; - bp->b_cylinder = bp->b_blkno / lp->d_secpercyl; bp->b_bcount = lp->d_secsize; bp->b_flags = B_BUSY | B_READ; (*strat)(bp); diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c index 1ac725d3994..5c4cdbb30b6 100644 --- a/sys/arch/vax/vsa/hdc9224.c +++ b/sys/arch/vax/vsa/hdc9224.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hdc9224.c,v 1.19 2007/06/09 01:02:28 deraadt Exp $ */ +/* $OpenBSD: hdc9224.c,v 1.20 2007/06/20 18:15:46 deraadt Exp $ */ /* $NetBSD: hdc9224.c,v 1.16 2001/07/26 15:05:09 wiz Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -364,7 +364,7 @@ hdattach(struct device *parent, struct device *self, void *aux) dl = hd->sc_disk.dk_label; hdmakelabel(dl, &hd->sc_xbn); msg = readdisklabel(MAKEDISKDEV(HDMAJOR, hd->sc_dev.dv_unit, RAW_PART), - hdstrategy, dl, NULL, 0); + hdstrategy, dl, 0); printf("%s: %luMB, %lu sectors\n", hd->sc_dev.dv_xname, DL_GETDSIZE(dl) / (1048576 / DEV_BSIZE), DL_GETDSIZE(dl)); @@ -449,8 +449,7 @@ hdstrategy(struct buf *bp) sc = (void *)hd->sc_dev.dv_parent; lp = hd->sc_disk.dk_label; - if ((bounds_check_with_label(bp, hd->sc_disk.dk_label, - hd->sc_disk.dk_cpulabel, 1)) <= 0) + if ((bounds_check_with_label(bp, hd->sc_disk.dk_label, 1)) <= 0) goto done; if (bp->b_bcount == 0) @@ -729,8 +728,8 @@ hdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) return EBADF; else err = (cmd == DIOCSDINFO ? - setdisklabel(lp, (struct disklabel *)addr, 0, 0) : - writedisklabel(dev, hdstrategy, lp, 0)); + setdisklabel(lp, (struct disklabel *)addr, 0) : + writedisklabel(dev, hdstrategy, lp)); break; case DIOCWLABEL: |