diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-09 03:56:49 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-09 03:56:49 +0000 |
commit | 286d80d720e22c23855a4337f119fcb87ef9f023 (patch) | |
tree | bf0f3f5a62ece5e65e07412155c57368525806be /sys | |
parent | e8c4393b5aede42bdec97befd7936d3f1dcd7011 (diff) |
be even more forceful with RAW_PART (and note this is the wrong, and temporary, place
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/subr_disk.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index c306971af06..ce110c854f7 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.52 2007/06/09 03:53:17 deraadt Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.53 2007/06/09 03:56:48 deraadt Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -198,9 +198,11 @@ disklabeltokernlabel(struct disklabel *lp) lp->d_secperunith = 0; } + /* XXX this should not be here */ if (DL_GETPOFFSET(&lp->d_partitions[RAW_PART]) != 0) { printf("disklabeltokernlabel: Your raw partition MUST start at 0\n"); DL_SETPOFFSET(&lp->d_partitions[RAW_PART], 0); + DL_SETPSIZE(&lp->d_partitions[RAW_PART], DL_GETDSIZE(lp)); } for (i = 0; i < MAXPARTITIONS; i++, pp++, v0pp++) { @@ -211,7 +213,9 @@ disklabeltokernlabel(struct disklabel *lp) pp->p_sizeh = 0; } -#ifdef notyet /* older broken sparc/sparc64 fake cyl-based disklabels fool this */ +#ifdef notyet + /* XXX this should not be here */ + /* In a V1 label no partition extends past DL_GETSIZE(lp) - 1. */ if (DL_GETPOFFSET(pp) > DL_GETDSIZE(lp)) { pp->p_fstype = FS_UNUSED; |