diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-04 22:08:00 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-04 22:08:00 +0000 |
commit | 8297162e222ea8a6ec9503918dd2ab0caa993a96 (patch) | |
tree | 5845e4dc8cf55439e08d74e45f76de09bb8bd119 /sys/kern/subr_disk.c | |
parent | 52c5477598178ac14ccf33d1ec3bde188fbc64eb (diff) |
disable a part of the label validation because some Sun systems
have contradictory information in their cyl-based labels
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r-- | sys/kern/subr_disk.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index 1b0a2c82e14..86b0da97669 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.45 2007/06/02 02:35:27 krw Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.46 2007/06/04 22:07:59 deraadt Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -191,7 +191,6 @@ disklabeltokernlabel(struct disklabel *lp) { struct __partitionv0 *v0pp = (struct __partitionv0 *)lp->d_partitions; struct partition *pp = lp->d_partitions; - daddr64_t sz; int i, oversion = lp->d_version; if (oversion == 0) { @@ -212,11 +211,15 @@ disklabeltokernlabel(struct disklabel *lp) pp->p_fstype = FS_UNUSED; pp->p_offset = pp->p_offseth = 0; pp->p_size = pp->p_sizeh = 0; +#ifdef notyet /* older broken sparc/sparc64 fake cyl-based disklabels fool this */ } else if ((DL_POFFSET(pp) + DL_PSIZE(pp)) > DL_DSIZE(lp)) { + daddr64_t sz; + pp->p_fstype = FS_UNUSED; sz = DL_DSIZE(lp) - DL_POFFSET(pp); pp->p_size = sz & 0xffffffff; pp->p_sizeh = (sz >> 32) & 0xffff; +#endif /* notyet */ } } } |