Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Being able to make image backups of your whole disk, ...



details:   https://anonhg.NetBSD.org/src/rev/7d9dd6db17b6
branches:  trunk
changeset: 542170:7d9dd6db17b6
user:      bad <bad%NetBSD.org@localhost>
date:      Thu Jan 23 00:00:32 2003 +0000

description:
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.

diffstat:

 sys/dev/ata/wd.c    |  7 +++----
 sys/dev/scsipi/cd.c |  7 +++----
 sys/dev/scsipi/sd.c |  7 +++----
 3 files changed, 9 insertions(+), 12 deletions(-)

diffs (84 lines):

diff -r b4bc1ce838ff -r 7d9dd6db17b6 sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c  Wed Jan 22 23:40:19 2003 +0000
+++ b/sys/dev/ata/wd.c  Thu Jan 23 00:00:32 2003 +0000
@@ -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 @@
         * 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 -r b4bc1ce838ff -r 7d9dd6db17b6 sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c       Wed Jan 22 23:40:19 2003 +0000
+++ b/sys/dev/scsipi/cd.c       Thu Jan 23 00:00:32 2003 +0000
@@ -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 @@
         * 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 -r b4bc1ce838ff -r 7d9dd6db17b6 sys/dev/scsipi/sd.c
--- a/sys/dev/scsipi/sd.c       Wed Jan 22 23:40:19 2003 +0000
+++ b/sys/dev/scsipi/sd.c       Thu Jan 23 00:00:32 2003 +0000
@@ -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 @@
         * 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;
 



Home | Main Index | Thread Index | Old Index