diff options
| author | bad <bad@NetBSD.org> | 2003-01-23 00:00:32 +0000 |
|---|---|---|
| committer | bad <bad@NetBSD.org> | 2003-01-23 00:00:32 +0000 |
| commit | f4aacfe9fcabb81bbeec24832fab9d4f5b79f969 (patch) | |
| tree | 020e409f3cbeb462aa24680117891b3b7890fcc1 | |
| parent | d1567e06c215936811a80c95c72b76a66671a842 (diff) | |
Being able to make image backups of your whole disk, not to mention not
causing certain ata disks to lock up by reading beyond the last block,
beats catering to broken devices.
bounds_check_with_label() RAW_PART too.
| -rw-r--r-- | sys/dev/ata/wd.c | 7 | ||||
| -rw-r--r-- | sys/dev/scsipi/cd.c | 7 | ||||
| -rw-r--r-- | sys/dev/scsipi/sd.c | 7 |
3 files changed, 9 insertions, 12 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index 0535265dcac..d9b3f7a618a 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.235 2003/01/20 05:30:04 simonb Exp $ */ +/* $NetBSD: wd.c,v 1.236 2003/01/23 00:00:32 bad Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.235 2003/01/20 05:30:04 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.236 2003/01/23 00:00:32 bad Exp $"); #ifndef WDCDEBUG #define WDCDEBUG @@ -495,8 +495,7 @@ wdstrategy(bp) * Do bounds checking, adjust transfer. if error, process. * If end of partition, just return. */ - if (WDPART(bp->b_dev) != RAW_PART && - bounds_check_with_label(bp, wd->sc_dk.dk_label, + if (bounds_check_with_label(bp, wd->sc_dk.dk_label, (wd->sc_flags & (WDF_WLABEL|WDF_LABELLING)) != 0) <= 0) goto done; diff --git a/sys/dev/scsipi/cd.c b/sys/dev/scsipi/cd.c index 8bd5f21a14c..66c677fcc84 100644 --- a/sys/dev/scsipi/cd.c +++ b/sys/dev/scsipi/cd.c @@ -1,4 +1,4 @@ -/* $NetBSD: cd.c,v 1.175 2003/01/20 05:30:09 simonb Exp $ */ +/* $NetBSD: cd.c,v 1.176 2003/01/23 00:00:33 bad Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.175 2003/01/20 05:30:09 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.176 2003/01/23 00:00:33 bad Exp $"); #include "rnd.h" @@ -584,8 +584,7 @@ cdstrategy(bp) * Do bounds checking, adjust transfer. if error, process. * If end of partition, just return. */ - if (CDPART(bp->b_dev) != RAW_PART && - bounds_check_with_label(bp, lp, + if (bounds_check_with_label(bp, lp, (cd->flags & (CDF_WLABEL|CDF_LABELLING)) != 0) <= 0) goto done; diff --git a/sys/dev/scsipi/sd.c b/sys/dev/scsipi/sd.c index dd7162ef1a7..69a2f185e4a 100644 --- a/sys/dev/scsipi/sd.c +++ b/sys/dev/scsipi/sd.c @@ -1,4 +1,4 @@ -/* $NetBSD: sd.c,v 1.193 2003/01/06 20:30:38 wiz Exp $ */ +/* $NetBSD: sd.c,v 1.194 2003/01/23 00:00:33 bad Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.193 2003/01/06 20:30:38 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.194 2003/01/23 00:00:33 bad Exp $"); #include "opt_scsi.h" #include "opt_bufq.h" @@ -631,8 +631,7 @@ sdstrategy(bp) * Do bounds checking, adjust transfer. if error, process. * If end of partition, just return. */ - if (SDPART(bp->b_dev) != RAW_PART && - bounds_check_with_label(bp, lp, + if (bounds_check_with_label(bp, lp, (sd->flags & (SDF_WLABEL|SDF_LABELLING)) != 0) <= 0) goto done; |
