summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-06-04 21:13:04 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-06-04 21:13:04 +0000
commit493210897221d7a7520ed88494339623a8d0cbb9 (patch)
tree437b23c9f66b7621e795b1a7278f3e5786b0ff8a /sys/arch/sparc64
parentfeadbccc8166eb1acafe6168fece9b1756dfb533 (diff)
Recycle four ancient fields in the disklabel structure, replacing them with
bounds information, ie. the zone of the disk that OpenBSD can use. Have each pre-disklabel parser (MBR, DPME, or per-arch MD disklabel parsers) figure out this area and pass it up to userland. Then, delete all the same disk parsing code from disklabel(8) since the kernel passes it up. Lots and lots of - signs in the disklabel(8) code. Tested on as many platforms as possible, the fallout will be repaired as time goes on. To test, use disklabel -d <drive> and validate that the bounds do not overlap any boot blocks. This same information is used by disklabel -A... OK for the concept from krw, miod, and drahn
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/disksubr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c
index 2bb7ddc9d67..5c210d13284 100644
--- a/sys/arch/sparc64/sparc64/disksubr.c
+++ b/sys/arch/sparc64/sparc64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.55 2009/05/13 01:31:58 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.56 2009/06/04 21:13:02 deraadt Exp $ */
/* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */
/*
@@ -112,7 +112,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *),
goto done;
}
- msg = checkdisklabel(bp->b_data + LABELOFFSET, lp);
+ msg = checkdisklabel(bp->b_data + LABELOFFSET, lp, 0, DL_GETDSIZE(lp));
if (msg == NULL)
goto done;
@@ -378,7 +378,7 @@ disklabel_sun_to_bsd(struct sun_disklabel *sl, struct disklabel *lp)
lp->d_checksum = 0;
lp->d_checksum = dkcksum(lp);
- return (checkdisklabel(lp, lp));
+ return (checkdisklabel(lp, lp, 0, DL_GETDSIZE(lp)));
}
/*