From e83b776d913d8ba599aa39549c620fb533c8de53 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Fri, 8 Aug 1997 21:47:07 +0000 Subject: 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. --- sys/arch/sparc/dev/xy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/arch/sparc/dev/xy.c') diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c index 2dc3413f2fe..50d250b5c32 100644 --- a/sys/arch/sparc/dev/xy.c +++ b/sys/arch/sparc/dev/xy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xy.c,v 1.9 1997/08/08 08:25:39 downsj Exp $ */ +/* $OpenBSD: xy.c,v 1.10 1997/08/08 21:46:51 niklas Exp $ */ /* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */ /* @@ -1033,7 +1033,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; /* -- cgit v1.2.3