diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-09 03:53:18 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-06-09 03:53:18 +0000 |
commit | e3012165c469656d526bab51b92d959f90359efe (patch) | |
tree | 86d141eaa3cda6b072dbfa4aa367a3392d603e99 /sys | |
parent | bd3008c73dee8cb5ef64354efa9cfd364108f681 (diff) |
push RAW_PART to 0 if it is non-zero, and bitch
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/subr_disk.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index 3f5a750f845..c306971af06 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.51 2007/06/06 22:04:11 deraadt Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.52 2007/06/09 03:53:17 deraadt Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -198,6 +198,11 @@ disklabeltokernlabel(struct disklabel *lp) lp->d_secperunith = 0; } + 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); + } + for (i = 0; i < MAXPARTITIONS; i++, pp++, v0pp++) { if (oversion == 0) { pp->p_fragblock = DISKLABELV1_FFS_FRAGBLOCK(v0pp-> |