diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-07-08 00:08:01 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-07-08 00:08:01 +0000 |
commit | 5c5174914b126b16e16b71af1fbbccebc9b73074 (patch) | |
tree | 7e90f306346903d195e4c1262787b40f5add4c77 /sys/arch/i386 | |
parent | df7b76c43207f6d611a5fe2869bb22159118a660 (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/i386')
-rw-r--r-- | sys/arch/i386/i386/disksubr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c index 479480959bf..3134fa90859 100644 --- a/sys/arch/i386/i386/disksubr.c +++ b/sys/arch/i386/i386/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.103 2011/04/16 03:21:15 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.104 2011/07/08 00:08:00 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -136,8 +136,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); |