summaryrefslogtreecommitdiff
path: root/sys/arch/vax/vsa/hdc9224.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/vax/vsa/hdc9224.c')
-rw-r--r--sys/arch/vax/vsa/hdc9224.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c
index bf95d76b523..6f8921f4666 100644
--- a/sys/arch/vax/vsa/hdc9224.c
+++ b/sys/arch/vax/vsa/hdc9224.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hdc9224.c,v 1.36 2011/06/05 18:40:33 matthew Exp $ */
+/* $OpenBSD: hdc9224.c,v 1.37 2011/07/06 04:49:36 matthew Exp $ */
/* $NetBSD: hdc9224.c,v 1.16 2001/07/26 15:05:09 wiz Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -440,22 +440,19 @@ hdstrategy(struct buf *bp)
{
struct hdsoftc *hd;
struct hdcsoftc *sc;
- struct disklabel *lp;
int unit, s;
unit = DISKUNIT(bp->b_dev);
if (unit > hd_cd.cd_ndevs || (hd = hd_cd.cd_devs[unit]) == NULL) {
bp->b_error = ENXIO;
bp->b_flags |= B_ERROR;
+ bp->b_resid = bp->b_bcount;
goto done;
}
sc = (void *)hd->sc_dev.dv_parent;
- lp = hd->sc_disk.dk_label;
- if ((bounds_check_with_label(bp, hd->sc_disk.dk_label)) <= 0)
- goto done;
-
- if (bp->b_bcount == 0)
+ /* Validate the request. */
+ if (bounds_check_with_label(bp, hd->sc_disk.dk_label) == -1)
goto done;
s = splbio();