diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-04 21:13:04 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-04 21:13:04 +0000 |
commit | 493210897221d7a7520ed88494339623a8d0cbb9 (patch) | |
tree | 437b23c9f66b7621e795b1a7278f3e5786b0ff8a /sys/arch/hppa | |
parent | feadbccc8166eb1acafe6168fece9b1756dfb533 (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/hppa')
-rw-r--r-- | sys/arch/hppa/hppa/disksubr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/hppa/hppa/disksubr.c b/sys/arch/hppa/hppa/disksubr.c index 8c46091d841..df0df856259 100644 --- a/sys/arch/hppa/hppa/disksubr.c +++ b/sys/arch/hppa/hppa/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.72 2008/06/12 06:58:34 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.73 2009/06/04 21:13:01 deraadt Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -213,6 +213,9 @@ finished: if (partoffp) *partoffp = fsoff; + DL_SETBSTART(lp, fsoff); + DL_SETBEND(lp, DL_GETDSIZE(lp)); /* XXX */ + if (spoofonly) goto done; @@ -227,7 +230,8 @@ finished: goto done; } - return checkdisklabel(bp->b_data + LABELOFFSET, lp); + return checkdisklabel(bp->b_data + LABELOFFSET, lp, fsoff, + DL_GETDSIZE(lp)); /* XXX */ done: if (dbp) { |