diff options
author | 2007-06-09 03:53:17 +0000 | |
---|---|---|
committer | 2007-06-09 03:53:17 +0000 | |
commit | b46608cbd011a8e399c80c3baf636c00d1987985 (patch) | |
tree | b163154bf947163283613edffd40890e8fd557c9 /sys/kern/subr_disk.c | |
parent | annoying spacing glitch which makes the diffs bigger (diff) | |
download | wireguard-openbsd-b46608cbd011a8e399c80c3baf636c00d1987985.tar.xz wireguard-openbsd-b46608cbd011a8e399c80c3baf636c00d1987985.zip |
push RAW_PART to 0 if it is non-zero, and bitch
Diffstat (limited to 'sys/kern/subr_disk.c')
-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-> |