diff options
Diffstat (limited to 'sys')
27 files changed, 102 insertions, 102 deletions
diff --git a/sys/arch/alpha/alpha/disksubr.c b/sys/arch/alpha/alpha/disksubr.c index 56a4fb5ce96..5b393ad419c 100644 --- a/sys/arch/alpha/alpha/disksubr.c +++ b/sys/arch/alpha/alpha/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.97 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.98 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -65,7 +65,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), bp->b_blkno = 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)) { @@ -120,7 +120,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) bp->b_blkno = 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) @@ -135,7 +135,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) csum += *p++; *p = csum; - 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); diff --git a/sys/arch/amd64/amd64/disksubr.c b/sys/arch/amd64/amd64/disksubr.c index 253d11b069d..61808336522 100644 --- a/sys/arch/amd64/amd64/disksubr.c +++ b/sys/arch/amd64/amd64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.60 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.61 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -135,7 +135,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) @@ -143,7 +143,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); diff --git a/sys/arch/amd64/amd64/dkcsum.c b/sys/arch/amd64/amd64/dkcsum.c index e95fb12119f..31316e62789 100644 --- a/sys/arch/amd64/amd64/dkcsum.c +++ b/sys/arch/amd64/amd64/dkcsum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dkcsum.c,v 1.17 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: dkcsum.c,v 1.18 2011/04/16 03:21:15 krw Exp $ */ /*- * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. @@ -113,7 +113,7 @@ dkcsumattach(void) /* Read blocks to cksum. XXX maybe a d_read should be used. */ bp->b_blkno = 0; bp->b_bcount = bios_cksumlen * DEV_BSIZE; - 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); bp->b_cylinder = 0; (*bdsw->d_strategy)(bp); diff --git a/sys/arch/arm/arm/disksubr.c b/sys/arch/arm/arm/disksubr.c index f5cd51b2fed..3f6dc22205e 100644 --- a/sys/arch/arm/arm/disksubr.c +++ b/sys/arch/arm/arm/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.55 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.56 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -110,7 +110,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) @@ -118,7 +118,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); diff --git a/sys/arch/aviion/aviion/disksubr.c b/sys/arch/aviion/aviion/disksubr.c index e1e819174ed..0c93ffae031 100644 --- a/sys/arch/aviion/aviion/disksubr.c +++ b/sys/arch/aviion/aviion/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.48 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.49 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -110,7 +110,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) @@ -118,7 +118,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); diff --git a/sys/arch/hp300/hp300/disksubr.c b/sys/arch/hp300/hp300/disksubr.c index 5609d121398..ce78c543c23 100644 --- a/sys/arch/hp300/hp300/disksubr.c +++ b/sys/arch/hp300/hp300/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.50 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.51 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.9 1997/04/01 03:12:13 scottr Exp $ */ /* @@ -69,7 +69,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), bp->b_blkno = 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)) { @@ -117,7 +117,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) bp->b_dev = dev; bp->b_blkno = 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) @@ -126,7 +126,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) /* Write it in the regular place. */ 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); diff --git a/sys/arch/hppa/hppa/disksubr.c b/sys/arch/hppa/hppa/disksubr.c index d8182be2974..950c30e50bc 100644 --- a/sys/arch/hppa/hppa/disksubr.c +++ b/sys/arch/hppa/hppa/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.79 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.80 2011/04/16 03:21:15 krw Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -104,7 +104,7 @@ readliflabel(struct buf *bp, void (*strat)(struct buf *), /* read LIF volume header */ bp->b_blkno = btodb(LIF_VOLSTART); 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)) @@ -122,7 +122,7 @@ readliflabel(struct buf *bp, void (*strat)(struct buf *), /* read LIF directory */ dbp->b_blkno = lifstodb(lvp->vol_addr); dbp->b_bcount = lp->d_secsize; - CLR(dbp->b_flags, B_WRITE | B_DONE); + CLR(dbp->b_flags, B_READ | B_WRITE | B_DONE); SET(dbp->b_flags, B_BUSY | B_READ | B_RAW); (*strat)(dbp); if (biowait(dbp)) { @@ -155,7 +155,7 @@ readliflabel(struct buf *bp, void (*strat)(struct buf *), /* read LIF directory */ dbp->b_blkno = lifstodb(p->dir_addr); dbp->b_bcount = lp->d_secsize; - CLR(dbp->b_flags, B_WRITE | B_DONE); + CLR(dbp->b_flags, B_READ | B_WRITE | B_DONE); SET(dbp->b_flags, B_BUSY | B_READ | B_RAW); (*strat)(dbp); @@ -226,7 +226,7 @@ finished: bp->b_blkno = fsoff + 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)) { @@ -266,7 +266,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) @@ -274,7 +274,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); diff --git a/sys/arch/hppa64/hppa64/disksubr.c b/sys/arch/hppa64/hppa64/disksubr.c index a22a77f4740..bbf5f3c0863 100644 --- a/sys/arch/hppa64/hppa64/disksubr.c +++ b/sys/arch/hppa64/hppa64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.63 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.64 2011/04/16 03:21:15 krw Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -104,7 +104,7 @@ readliflabel(struct buf *bp, void (*strat)(struct buf *), /* read LIF volume header */ bp->b_blkno = btodb(LIF_VOLSTART); 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)) @@ -122,7 +122,7 @@ readliflabel(struct buf *bp, void (*strat)(struct buf *), /* read LIF directory */ dbp->b_blkno = lifstodb(lvp->vol_addr); dbp->b_bcount = lp->d_secsize; - CLR(dbp->b_flags, B_WRITE | B_DONE); + CLR(dbp->b_flags, B_READ | B_WRITE | B_DONE); SET(dbp->b_flags, B_BUSY | B_READ | B_RAW); (*strat)(dbp); if (biowait(dbp)) { @@ -155,7 +155,7 @@ readliflabel(struct buf *bp, void (*strat)(struct buf *), /* read LIF directory */ dbp->b_blkno = lifstodb(p->dir_addr); dbp->b_bcount = lp->d_secsize; - CLR(dbp->b_flags, B_WRITE | B_DONE); + CLR(dbp->b_flags, B_READ | B_WRITE | B_DONE); SET(dbp->b_flags, B_BUSY | B_READ | B_RAW); (*strat)(dbp); @@ -226,7 +226,7 @@ finished: bp->b_blkno = fsoff + 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)) { @@ -266,7 +266,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) @@ -274,7 +274,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); diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c index 6a5efdd3bc2..479480959bf 100644 --- a/sys/arch/i386/i386/disksubr.c +++ b/sys/arch/i386/i386/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.102 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.103 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -139,7 +139,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) bp->b_blkno = DL_BLKTOSEC(lp, partoff+LABELSECTOR) * DL_BLKSPERSEC(lp); offset = DL_BLKOFFSET(lp, partoff + LABELSECTOR) + LABELOFFSET; 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) @@ -147,7 +147,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) dlp = (struct disklabel *)(bp->b_data + offset); *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); diff --git a/sys/arch/i386/i386/dkcsum.c b/sys/arch/i386/i386/dkcsum.c index 7c17e08218e..f0c6c6867c6 100644 --- a/sys/arch/i386/i386/dkcsum.c +++ b/sys/arch/i386/i386/dkcsum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dkcsum.c,v 1.28 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: dkcsum.c,v 1.29 2011/04/16 03:21:15 krw Exp $ */ /*- * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. @@ -113,7 +113,7 @@ dkcsumattach(void) /* Read blocks to cksum. XXX maybe a d_read should be used. */ bp->b_blkno = 0; bp->b_bcount = bios_cksumlen * DEV_BSIZE; - 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); bp->b_cylinder = 0; (*bdsw->d_strategy)(bp); diff --git a/sys/arch/landisk/landisk/disksubr.c b/sys/arch/landisk/landisk/disksubr.c index 49b110fcc15..c7cb21dc36a 100644 --- a/sys/arch/landisk/landisk/disksubr.c +++ b/sys/arch/landisk/landisk/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.43 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.44 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -110,7 +110,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) @@ -118,7 +118,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); diff --git a/sys/arch/loongson/loongson/disksubr.c b/sys/arch/loongson/loongson/disksubr.c index 0c7d05c0483..89a6f23d74a 100644 --- a/sys/arch/loongson/loongson/disksubr.c +++ b/sys/arch/loongson/loongson/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.4 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.5 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -110,7 +110,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) @@ -118,7 +118,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); diff --git a/sys/arch/luna88k/luna88k/disksubr.c b/sys/arch/luna88k/luna88k/disksubr.c index 88414884d58..ac6b1960436 100644 --- a/sys/arch/luna88k/luna88k/disksubr.c +++ b/sys/arch/luna88k/luna88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.49 2011/04/15 14:57:28 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.50 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.12 2002/02/19 17:09:44 wiz Exp $ */ /* @@ -120,7 +120,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), bp->b_blkno = LABELSECTOR; bp->b_cylinder = 0; 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)) { @@ -174,7 +174,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) bp->b_blkno = LABELSECTOR; bp->b_cylinder = 0; 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); @@ -187,7 +187,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) if (error) goto done; - 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); diff --git a/sys/arch/mac68k/mac68k/disksubr.c b/sys/arch/mac68k/mac68k/disksubr.c index a30e0caa73c..c5f49162537 100644 --- a/sys/arch/mac68k/mac68k/disksubr.c +++ b/sys/arch/mac68k/mac68k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.62 2011/04/15 14:57:29 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.63 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.22 1997/11/26 04:18:20 briggs Exp $ */ /* @@ -410,7 +410,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), bp->b_blkno = LABELSECTOR; bp->b_bcount = size; - 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)) { @@ -431,7 +431,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), /* Get a MI label */ bp->b_blkno = 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)) { @@ -489,7 +489,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) bp->b_blkno = 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) @@ -504,7 +504,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); 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); diff --git a/sys/arch/mvme68k/mvme68k/disksubr.c b/sys/arch/mvme68k/mvme68k/disksubr.c index e92e997127a..f585eb33427 100644 --- a/sys/arch/mvme68k/mvme68k/disksubr.c +++ b/sys/arch/mvme68k/mvme68k/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 $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -63,7 +63,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), bp->b_blkno = 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)) { @@ -111,7 +111,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 = 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) @@ -119,7 +119,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) bsdtocpulabel(lp, (struct mvmedisklabel *)bp->b_data); - 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); diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c index 796a4c6c07e..ca8f43b0648 100644 --- a/sys/arch/mvme88k/mvme88k/disksubr.c +++ b/sys/arch/mvme88k/mvme88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.67 2011/04/15 14:57:29 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.68 2011/04/16 03:21:15 krw Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -63,7 +63,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), bp->b_blkno = 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)) { @@ -111,7 +111,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 = 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) @@ -119,7 +119,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) bsdtocpulabel(lp, (struct mvmedisklabel *)bp->b_data); - 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); diff --git a/sys/arch/mvmeppc/mvmeppc/disksubr.c b/sys/arch/mvmeppc/mvmeppc/disksubr.c index 84888764493..483d0d931d1 100644 --- a/sys/arch/mvmeppc/mvmeppc/disksubr.c +++ b/sys/arch/mvmeppc/mvmeppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.61 2011/04/15 14:57:29 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.62 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -110,7 +110,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) @@ -118,7 +118,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); diff --git a/sys/arch/octeon/octeon/disksubr.c b/sys/arch/octeon/octeon/disksubr.c index 45380b2089a..89a6f23d74a 100644 --- a/sys/arch/octeon/octeon/disksubr.c +++ b/sys/arch/octeon/octeon/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.4 2011/04/15 14:57:29 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.5 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */ /* @@ -110,7 +110,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) @@ -118,7 +118,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); diff --git a/sys/arch/sgi/sgi/disksubr.c b/sys/arch/sgi/sgi/disksubr.c index 0eea3ff3c91..2e2ad60ccb0 100644 --- a/sys/arch/sgi/sgi/disksubr.c +++ b/sys/arch/sgi/sgi/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.22 2011/04/15 14:57:29 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.23 2011/04/16 03:21:15 krw Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -118,7 +118,7 @@ readsgilabel(struct buf *bp, void (*strat)(struct buf *), bp->b_blkno = 0; 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); @@ -200,7 +200,7 @@ finished: DL_BLKSPERSEC(lp); offset = DL_BLKOFFSET(lp, fsoffs + LABELSECTOR) + LABELOFFSET; 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)) @@ -232,7 +232,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) bp->b_blkno = DL_BLKTOSEC(lp, partoff+LABELSECTOR) * DL_BLKSPERSEC(lp); offset = DL_BLKOFFSET(lp, partoff + LABELSECTOR) + LABELOFFSET; 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) @@ -240,7 +240,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) dlp = (struct disklabel *)(bp->b_data + offset); *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); diff --git a/sys/arch/socppc/socppc/disksubr.c b/sys/arch/socppc/socppc/disksubr.c index 22919ae18e8..1fb5a3b6d1b 100644 --- a/sys/arch/socppc/socppc/disksubr.c +++ b/sys/arch/socppc/socppc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.14 2011/04/15 14:57:29 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.15 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)) @@ -176,7 +176,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)) @@ -207,7 +207,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) @@ -215,7 +215,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); diff --git a/sys/arch/sparc/sparc/disksubr.c b/sys/arch/sparc/sparc/disksubr.c index 0cab0c066c3..ee6d16920ee 100644 --- a/sys/arch/sparc/sparc/disksubr.c +++ b/sys/arch/sparc/sparc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.89 2011/04/15 14:57:29 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.90 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.16 1996/04/28 20:25:59 thorpej Exp $ */ /* @@ -102,7 +102,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), bp->b_blkno = 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)) { @@ -166,7 +166,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) /* Write out the updated label. */ bp->b_blkno = LABELSECTOR; bp->b_bcount = lp->d_secsize; - 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); diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c index 20dd0f4a109..01e4f1ee0b8 100644 --- a/sys/arch/sparc64/sparc64/disksubr.c +++ b/sys/arch/sparc64/sparc64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.65 2011/04/15 14:57:29 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.66 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */ /* @@ -95,7 +95,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), bp->b_blkno = 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)) { @@ -158,7 +158,7 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) /* Write out the updated label. */ bp->b_blkno = LABELSECTOR; bp->b_bcount = lp->d_secsize; - 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); diff --git a/sys/arch/vax/vax/disksubr.c b/sys/arch/vax/vax/disksubr.c index 4c8245cb677..2d90272813c 100644 --- a/sys/arch/vax/vax/disksubr.c +++ b/sys/arch/vax/vax/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.64 2011/04/15 14:57:29 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.65 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.21 1999/06/30 18:48:06 ragge Exp $ */ /* @@ -77,7 +77,7 @@ readdisklabel(dev_t dev, void (*strat)(struct buf *), bp->b_blkno = 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)) { @@ -127,7 +127,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 = 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) @@ -135,7 +135,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); diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index c6a53f75616..2f33e089520 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vfsops.c,v 1.57 2011/04/15 14:57:29 krw Exp $ */ +/* $OpenBSD: cd9660_vfsops.c,v 1.58 2011/04/16 03:21:15 krw Exp $ */ /* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */ /*- @@ -479,7 +479,7 @@ iso_disklabelspoof(dev, strat, lp) for (iso_blknum = 16; iso_blknum < 100; iso_blknum++) { bp->b_blkno = iso_blknum * btodb(ISO_DEFAULT_BLOCK_SIZE); bp->b_bcount = ISO_DEFAULT_BLOCK_SIZE; - 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); bp->b_cylinder = bp->b_blkno / lp->d_secpercyl; diff --git a/sys/isofs/udf/udf_subr.c b/sys/isofs/udf/udf_subr.c index 5dc2c014315..18d55a0954f 100644 --- a/sys/isofs/udf/udf_subr.c +++ b/sys/isofs/udf/udf_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_subr.c,v 1.21 2011/04/15 14:57:29 krw Exp $ */ +/* $OpenBSD: udf_subr.c,v 1.22 2011/04/16 03:21:16 krw Exp $ */ /* * Copyright (c) 2006, Miodrag Vallat @@ -110,7 +110,7 @@ udf_disklabelspoof(dev_t dev, void (*strat)(struct buf *), */ bp->b_blkno = sector * btodb(bsize); bp->b_bcount = bsize; - 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); bp->b_resid = bp->b_blkno / lp->d_secpercyl; @@ -131,7 +131,7 @@ udf_disklabelspoof(dev_t dev, void (*strat)(struct buf *), for (sector = mvds_start; sector < mvds_end; sector++) { bp->b_blkno = sector * btodb(bsize); bp->b_bcount = bsize; - 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); bp->b_resid = bp->b_blkno / lp->d_secpercyl; diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index d9ccb8a229d..a488b3c7842 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.118 2011/04/15 14:57:29 krw Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.119 2011/04/16 03:21:16 krw Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -410,7 +410,7 @@ readdoslabel(struct buf *bp, void (*strat)(struct buf *), bp->b_blkno = DL_BLKTOSEC(lp, part_blkno) * DL_BLKSPERSEC(lp); offset = DL_BLKOFFSET(lp, part_blkno) + DOSPARTOFF; 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); error = biowait(bp); @@ -596,7 +596,7 @@ notfat: DL_BLKSPERSEC(lp); offset = DL_BLKOFFSET(lp, dospartoff + DOS_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)) |