diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-07-05 19:18:23 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-07-05 19:18:23 +0000 |
commit | d56cd66a0966d5e8f732cfe498a868f8b38946d1 (patch) | |
tree | 7d7462678b5a73e3f2896136d78189968a4e1db3 /sys/arch | |
parent | cc88eba7d78fa95eff1a87a6d133aa41ab1044e6 (diff) |
Make sure the OpenBSD bounds exclude the first cylinder, which is used
to store the bootblocks.
ok deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hp300/hp300/disksubr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/hp300/hp300/disksubr.c b/sys/arch/hp300/hp300/disksubr.c index c7750499c1f..78f47c9fbd9 100644 --- a/sys/arch/hp300/hp300/disksubr.c +++ b/sys/arch/hp300/hp300/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.45 2009/06/04 21:13:01 deraadt Exp $ */ +/* $OpenBSD: disksubr.c,v 1.46 2009/07/05 19:18:22 miod Exp $ */ /* $NetBSD: disksubr.c,v 1.9 1997/04/01 03:12:13 scottr Exp $ */ /* @@ -62,6 +62,8 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), bp = geteblk((int)lp->d_secsize); bp->b_dev = dev; + DL_SETBSTART(lp, lp->d_secpercyl); + /* don't read the on-disk label if we are in spoofed-only mode */ if (spoofonly) goto done; @@ -75,7 +77,8 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), goto done; } - msg = checkdisklabel(bp->b_data + LABELOFFSET, lp, 0, DL_GETDSIZE(lp)); + msg = checkdisklabel(bp->b_data + LABELOFFSET, lp, + DL_GETBSTART(lp), DL_GETDSIZE(lp)); if (msg == NULL) goto done; |