summaryrefslogtreecommitdiff
path: root/sys/arch/sun3/dev
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-08-08 21:47:07 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-08-08 21:47:07 +0000
commite83b776d913d8ba599aa39549c620fb533c8de53 (patch)
tree91402695de0f0016c37fac593b91f9316fa38b34 /sys/arch/sun3/dev
parentfa3ac60890d403b6994891797ae40ea98456004a (diff)
Change the bounds_check_with_label API to also take a cpu_disklabel
reference for making transferral of meta-information possible from readdisklabel to bounds_check_with_label. The first (and maybe only) thing that will use this is the multi-disklabel-format code on the alpha where the labelsector is passed via cpu_disklabel so the label write-protection can work correctly no matter what label was found. Also use a new macro DKBAD to get at the dkbad field of the cpu_disklabel implementations that contain it. This too is for multi-disklabel architectures where the "bad" field can be inside a union. Use this macro as a means for a driver to check if an architecture supports dkbad constructs. Remove proto of bounds_check_with_label from all MD disklabel.h as it is in sys/disklabel.h. I have not been able to test the changes everywhere, if I break anything I apologize, and promise to fix it as soon as I become aware of it.
Diffstat (limited to 'sys/arch/sun3/dev')
-rw-r--r--sys/arch/sun3/dev/xd.c4
-rw-r--r--sys/arch/sun3/dev/xy.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/sun3/dev/xd.c b/sys/arch/sun3/dev/xd.c
index a581866f049..48c6160d22b 100644
--- a/sys/arch/sun3/dev/xd.c
+++ b/sys/arch/sun3/dev/xd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xd.c,v 1.10 1997/01/16 04:03:55 kstailey Exp $ */
+/* $OpenBSD: xd.c,v 1.11 1997/08/08 21:46:53 niklas Exp $ */
/* $NetBSD: xd.c,v 1.10 1996/10/13 03:47:39 christos Exp $ */
/*
@@ -1036,7 +1036,7 @@ xdstrategy(bp)
* completion. */
if (bounds_check_with_label(bp, xd->sc_dk.dk_label,
- (xd->flags & XD_WLABEL) != 0) <= 0)
+ xd->sc_dk.dk_cpulabel, (xd->flags & XD_WLABEL) != 0) <= 0)
goto done;
/*
diff --git a/sys/arch/sun3/dev/xy.c b/sys/arch/sun3/dev/xy.c
index a7df9924e20..c09c3deb1c6 100644
--- a/sys/arch/sun3/dev/xy.c
+++ b/sys/arch/sun3/dev/xy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xy.c,v 1.9 1997/01/16 04:03:58 kstailey Exp $ */
+/* $OpenBSD: xy.c,v 1.10 1997/08/08 21:46:54 niklas Exp $ */
/* $NetBSD: xy.c,v 1.11 1996/10/13 03:47:40 christos Exp $ */
/*
@@ -999,7 +999,7 @@ xystrategy(bp)
* completion. */
if (bounds_check_with_label(bp, xy->sc_dk.dk_label,
- (xy->flags & XY_WLABEL) != 0) <= 0)
+ xy->sc_dk.dk_cpulabel, (xy->flags & XY_WLABEL) != 0) <= 0)
goto done;
/*