Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/scsipi Pull up revision 1.174 (requested by fvdl):



details:   https://anonhg.NetBSD.org/src/rev/3a898cd87fef
branches:  netbsd-1-5
changeset: 491671:3a898cd87fef
user:      he <he%NetBSD.org@localhost>
date:      Sun May 06 20:49:15 2001 +0000

description:
Pull up revision 1.174 (requested by fvdl):
  Compensate for the fact that after __HAVE_OLD_DISKLABEL,
  DISKMINOR(u,p) is no longer contiguous over ``p'', so ranges
  cannot be passed to vdevgone().

diffstat:

 sys/dev/scsipi/sd.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r 8c8ef86cc7c7 -r 3a898cd87fef sys/dev/scsipi/sd.c
--- a/sys/dev/scsipi/sd.c       Sun May 06 20:49:00 2001 +0000
+++ b/sys/dev/scsipi/sd.c       Sun May 06 20:49:15 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sd.c,v 1.163.2.2 2001/05/01 12:27:41 he Exp $  */
+/*     $NetBSD: sd.c,v 1.163.2.3 2001/05/06 20:49:15 he Exp $  */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -253,7 +253,7 @@
 {
        struct sd_softc *sd = (struct sd_softc *) self;
        struct buf *bp;
-       int s, bmaj, cmaj, mn;
+       int s, bmaj, cmaj, i, mn;
 
        /* locate the major number */
        for (bmaj = 0; bmaj <= nblkdev; bmaj++)
@@ -280,9 +280,11 @@
        splx(s);
 
        /* Nuke the vnodes for any open instances */
-       mn = SDMINOR(self->dv_unit, 0);
-       vdevgone(bmaj, mn, mn + (MAXPARTITIONS - 1), VBLK);
-       vdevgone(cmaj, mn, mn + (MAXPARTITIONS - 1), VCHR);
+       for (i = 0; i < MAXPARTITIONS; i++) {
+               mn = SDMINOR(self->dv_unit, i);
+               vdevgone(bmaj, mn, mn, VBLK);
+               vdevgone(cmaj, mn, mn, VCHR);
+       }
 
        /* Detach from the disk list. */
        disk_detach(&sd->sc_dk);



Home | Main Index | Thread Index | Old Index