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/landisk | |
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/landisk')
-rw-r--r-- | sys/arch/landisk/landisk/disksubr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/landisk/landisk/disksubr.c b/sys/arch/landisk/landisk/disksubr.c index 61f5a5869ea..e2c7a7464bc 100644 --- a/sys/arch/landisk/landisk/disksubr.c +++ b/sys/arch/landisk/landisk/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.45 2011/07/06 15:26:50 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.46 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); |