summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2011-04-16 03:21:17 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2011-04-16 03:21:17 +0000
commit5af5d78d1338b0c4709985e75d6a36132d6c2ac5 (patch)
tree06204a0001ec3bd364dcad84343781986e7366ec /sys/arch/macppc
parent4756385e9b648975c08e5d54adb8d4ac7ce047f2 (diff)
Use 'CLR(<buf>->b_flags, B_READ | B_WRITE | B_DONE)' regardless of
what the previous IO was. Less chance of copy and paste errors. Suggested by miod@.
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r--sys/arch/macppc/macppc/disksubr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c
index ae722f1d37d..7de5fe48134 100644
--- a/sys/arch/macppc/macppc/disksubr.c
+++ b/sys/arch/macppc/macppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.71 2011/04/15 14:57:29 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.72 2011/04/16 03:21:15 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -108,7 +108,7 @@ readdpmelabel(struct buf *bp, void (*strat)(struct buf *),
/* First check for a DPME (HFS) disklabel */
bp->b_blkno = 1;
bp->b_bcount = lp->d_secsize;
- CLR(bp->b_flags, B_WRITE | B_DONE);
+ CLR(bp->b_flags, B_READ | B_WRITE | B_DONE);
SET(bp->b_flags, B_BUSY | B_READ | B_RAW);
(*strat)(bp);
if (biowait(bp))
@@ -127,7 +127,7 @@ readdpmelabel(struct buf *bp, void (*strat)(struct buf *),
bp->b_blkno = 1+i;
bp->b_bcount = lp->d_secsize;
- CLR(bp->b_flags, B_WRITE | B_DONE);
+ CLR(bp->b_flags, B_READ | B_WRITE | B_DONE);
SET(bp->b_flags, B_BUSY | B_READ | B_RAW);
(*strat)(bp);
if (biowait(bp))
@@ -177,7 +177,7 @@ readdpmelabel(struct buf *bp, void (*strat)(struct buf *),
/* next, dig out disk label */
bp->b_blkno = hfspartoff + LABELSECTOR;
bp->b_bcount = lp->d_secsize;
- CLR(bp->b_flags, B_WRITE | B_DONE);
+ CLR(bp->b_flags, B_READ | B_WRITE | B_DONE);
SET(bp->b_flags, B_BUSY | B_READ | B_RAW);
(*strat)(bp);
if (biowait(bp))
@@ -208,7 +208,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp)
/* Read it in, slap the new label in, and write it back out */
bp->b_blkno = partoff + LABELSECTOR;
bp->b_bcount = lp->d_secsize;
- CLR(bp->b_flags, B_WRITE | B_DONE);
+ CLR(bp->b_flags, B_READ | B_WRITE | B_DONE);
SET(bp->b_flags, B_BUSY | B_READ | B_RAW);
(*strat)(bp);
if ((error = biowait(bp)) != 0)
@@ -216,7 +216,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp)
dlp = (struct disklabel *)(bp->b_data + LABELOFFSET);
*dlp = *lp;
- CLR(bp->b_flags, B_READ | B_DONE);
+ CLR(bp->b_flags, B_READ | B_WRITE | B_DONE);
SET(bp->b_flags, B_BUSY | B_WRITE | B_RAW);
(*strat)(bp);
error = biowait(bp);