diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-04-15 14:57:30 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-04-15 14:57:30 +0000 |
commit | b4beef39345d1dbe85f71c6935ff2742c4b8a5b8 (patch) | |
tree | 9e953ccf05e5ba2fbe93b2d58c5fdb2fa680cafb /sys/isofs/cd9660 | |
parent | 333e7f4bad1ad8fde2bfadcf79001104562ccc74 (diff) |
In days of yore one could arbitrarily whack buffer flags. Those days
are past. Use CLR() and SET() to modify necessary flags while leaving
the flags used by the buffer cache in peace.
Should make bufcache code much less confused about the state of the
bufs used in reading/writing disklabels. Other such flag abuses no
doubt await a visit.
Errors in original diff found by miod@.
ok beck@ deraadt@
Diffstat (limited to 'sys/isofs/cd9660')
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index c1306f654b1..c6a53f75616 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.56 2010/12/21 20:14:43 thib Exp $ */ +/* $OpenBSD: cd9660_vfsops.c,v 1.57 2011/04/15 14:57:29 krw Exp $ */ /* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */ /*- @@ -479,7 +479,8 @@ 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; - bp->b_flags = B_BUSY | B_READ | B_RAW; + CLR(bp->b_flags, B_WRITE | B_DONE); + SET(bp->b_flags, B_BUSY | B_READ | B_RAW); bp->b_cylinder = bp->b_blkno / lp->d_secpercyl; /*printf("d_secsize %d iso_blknum %d b_blkno %d bcount %d\n", |