aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2000-03-20 10:44:49 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2000-03-20 10:44:49 +0000
commit21144e3bf1f416a758f6546bfabfa8e4e8cba507 (patch)
treec87da548b12fd12c48f1e5c89d087ddfa088ee78 /sys/amd64
parent44bdcfa638d9ca31180090798a88116220f7f625 (diff)
Notes
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/genassym.c1
-rw-r--r--sys/amd64/amd64/machdep.c4
-rw-r--r--sys/amd64/amd64/vm_machdep.c2
3 files changed, 3 insertions, 4 deletions
diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c
index 3e843db516bd..23039820715e 100644
--- a/sys/amd64/amd64/genassym.c
+++ b/sys/amd64/amd64/genassym.c
@@ -153,7 +153,6 @@ ASSYM(SC_GS, offsetof(struct osigcontext, sc_gs));
ASSYM(SC_TRAPNO, offsetof(struct osigcontext, sc_trapno));
ASSYM(UC_EFLAGS, offsetof(ucontext_t, uc_mcontext.mc_eflags));
ASSYM(UC_GS, offsetof(ucontext_t, uc_mcontext.mc_gs));
-ASSYM(B_READ, B_READ);
ASSYM(ENOENT, ENOENT);
ASSYM(EFAULT, EFAULT);
ASSYM(ENAMETOOLONG, ENAMETOOLONG);
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index c204fbeeb72e..bc6dc89beb85 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -2360,7 +2360,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
#if LABELSECTOR != 0
bp->b_blkno + p->p_offset + sz > LABELSECTOR + labelsect &&
#endif
- (bp->b_flags & B_READ) == 0 && wlabel == 0) {
+ (bp->b_iocmd == BIO_WRITE) && wlabel == 0) {
bp->b_error = EROFS;
goto bad;
}
@@ -2368,7 +2368,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
#if defined(DOSBBSECTOR) && defined(notyet)
/* overwriting master boot record? */
if (bp->b_blkno + p->p_offset <= DOSBBSECTOR &&
- (bp->b_flags & B_READ) == 0 && wlabel == 0) {
+ (bp->b_iocmd == BIO_WRITE) && wlabel == 0) {
bp->b_error = EROFS;
goto bad;
}
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index cdcc27806aef..9f5d6c046d46 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -357,7 +357,7 @@ vmapbuf(bp)
* when reading stuff off device into memory.
*/
vm_fault_quick(addr,
- (bp->b_flags&B_READ)?(VM_PROT_READ|VM_PROT_WRITE):VM_PROT_READ);
+ (bp->b_iocmd == BIO_READ)?(VM_PROT_READ|VM_PROT_WRITE):VM_PROT_READ);
pa = trunc_page(pmap_kextract((vm_offset_t) addr));
if (pa == 0)
panic("vmapbuf: page not present");