summaryrefslogtreecommitdiff
path: root/sys/dev/atapi
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/dev/atapi
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/dev/atapi')
-rw-r--r--sys/dev/atapi/acd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/atapi/acd.c b/sys/dev/atapi/acd.c
index 5d4c74aca34..39a696e1522 100644
--- a/sys/dev/atapi/acd.c
+++ b/sys/dev/atapi/acd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acd.c,v 1.26 1997/07/07 19:48:46 niklas Exp $ */
+/* $OpenBSD: acd.c,v 1.27 1997/08/08 21:47:00 niklas Exp $ */
/*
* Copyright (c) 1996 Manuel Bouyer. All rights reserved.
@@ -490,6 +490,7 @@ acdstrategy(bp)
*/
if (CDPART(bp->b_dev) != RAW_PART &&
bounds_check_with_label(bp, acd->sc_dk.dk_label,
+ acd->sc_dk.dk_cpulabel,
(acd->flags & (CDF_WLABEL|CDF_LABELLING)) != 0) <= 0)
goto done;