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/ata Pull up revision 1.213 (requested by fvdl):



details:   https://anonhg.NetBSD.org/src/rev/fa63322cfa6b
branches:  netbsd-1-5
changeset: 491669:fa63322cfa6b
user:      he <he%NetBSD.org@localhost>
date:      Sun May 06 20:48:42 2001 +0000

description:
Pull up revision 1.213 (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/ata/wd.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r 1fbf26becd15 -r fa63322cfa6b sys/dev/ata/wd.c
--- a/sys/dev/ata/wd.c  Sun May 06 20:40:54 2001 +0000
+++ b/sys/dev/ata/wd.c  Sun May 06 20:48:42 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wd.c,v 1.205.2.1 2001/05/01 12:27:11 he Exp $ */
+/*     $NetBSD: wd.c,v 1.205.2.2 2001/05/06 20:48:42 he Exp $ */
 
 /*
  * Copyright (c) 1998 Manuel Bouyer.  All rights reserved.
@@ -382,7 +382,7 @@
 {
        struct wd_softc *sc = (struct wd_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++)
@@ -406,9 +406,11 @@
        splx(s);
 
        /* Nuke the vnodes for any open instances. */
-       mn = WDMINOR(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 = WDMINOR(self->dv_unit, i);
+               vdevgone(bmaj, mn, mn, VBLK);
+               vdevgone(cmaj, mn, mn, VCHR);
+       }
 
        /* Detach disk. */
        disk_detach(&sc->sc_dk);



Home | Main Index | Thread Index | Old Index