Removed B_READ and B_WRITE.

This commit is contained in:
KATO Takenori 2000-03-23 08:53:15 +00:00
parent aad7652706
commit bef3dd268d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58476

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 1998, 1999 Sřren Schmidt
* Copyright (c) 1998, 1999 Sen Schmidt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -441,7 +441,7 @@ acdstrategy(struct buf *bp)
#ifdef NOTYET
/* allow write only on CD-R/RW media */ /* all for now SOS */
if (!(bp->b_flags & B_READ) && !(writeable_media)) {
if ((bp->b_iocmd == BIO_WRITE) && !(writeable_media)) {
bp->b_error = EROFS;
bp->b_flags |= B_ERROR;
biodone(bp);
@ -487,7 +487,7 @@ acd_start(struct acd *cdp)
acd_select_slot(cdp);
if ((bp->b_flags & B_READ) == B_WRITE) {
if (bp->b_iocmd == BIO_WRITE) {
if ((cdp->flags & F_TRACK_PREPED) == 0) {
if ((cdp->flags & F_TRACK_PREP) == 0) {
printf("wcd%d: sequence error\n", cdp->lun);
@ -505,7 +505,7 @@ acd_start(struct acd *cdp)
}
}
if (bp->b_flags & B_READ)
if (bp->b_iocmd == BIO_READ)
#ifdef NOTYET
lba = bp->b_offset / cdp->block_size;
#else
@ -515,7 +515,7 @@ acd_start(struct acd *cdp)
lba = cdp->next_writeable_lba + (bp->b_offset / cdp->block_size);
blocks = (bp->b_bcount + (cdp->block_size - 1)) / cdp->block_size;
if ((bp->b_flags & B_READ) == B_WRITE) {
if (bp->b_iocmd == BIO_WRITE) {
cmd = ATAPI_WRITE_BIG;
count = -bp->b_bcount;
} else {
@ -542,7 +542,7 @@ acd_done(struct acd *cdp, struct buf *bp, int resid, struct atapires result)
bp->b_flags |= B_ERROR;
} else {
bp->b_resid = resid;
if ((bp->b_flags & B_READ) == B_WRITE)
if (bp->b_iocmd == BIO_WRITE)
cdp->flags |= F_WRITTEN;
}
devstat_end_transaction_buf(cdp->device_stats, bp);