summaryrefslogtreecommitdiff
path: root/sys/arch/aviion
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2011-07-08 00:08:01 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2011-07-08 00:08:01 +0000
commit5c5174914b126b16e16b71af1fbbccebc9b73074 (patch)
tree7e90f306346903d195e4c1262787b40f5add4c77 /sys/arch/aviion
parentdf7b76c43207f6d611a5fe2869bb22159118a660 (diff)
When reading dos labels use DOS_LABELSECTOR and don't use LABELOFFSET. For all these
arch's LABELSECTOR == DOS_LABELSECTOR == 1, and LABELOFFSET == 0. Thus, to quote bob, "This is a no-op". Makes the expression used when writing label the same as the one used in readdoslabel().
Diffstat (limited to 'sys/arch/aviion')
-rw-r--r--sys/arch/aviion/aviion/disksubr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/aviion/aviion/disksubr.c b/sys/arch/aviion/aviion/disksubr.c
index 09917777805..c7d9c63ae21 100644
--- a/sys/arch/aviion/aviion/disksubr.c
+++ b/sys/arch/aviion/aviion/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.50 2011/07/06 15:26:50 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.51 2011/07/08 00:08:00 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -109,8 +109,9 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp)
goto done;
/* Read it in, slap the new label in, and write it back out */
- bp->b_blkno = DL_BLKTOSEC(lp, partoff+LABELSECTOR) * DL_BLKSPERSEC(lp);
- offset = DL_BLKOFFSET(lp, partoff + LABELSECTOR) + LABELOFFSET;
+ bp->b_blkno = DL_BLKTOSEC(lp, partoff + DOS_LABELSECTOR) *
+ DL_BLKSPERSEC(lp);
+ offset = DL_BLKOFFSET(lp, partoff + DOS_LABELSECTOR);
bp->b_bcount = lp->d_secsize;
CLR(bp->b_flags, B_READ | B_WRITE | B_DONE);
SET(bp->b_flags, B_BUSY | B_READ | B_RAW);