Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/scsipi Calculate the correct device minor of the fir...



details:   https://anonhg.NetBSD.org/src/rev/5676ee249d42
branches:  trunk
changeset: 476591:5676ee249d42
user:      enami <enami%NetBSD.org@localhost>
date:      Tue Sep 21 03:10:00 1999 +0000

description:
Calculate the correct device minor of the first partition.

diffstat:

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

diffs (26 lines):

diff -r 72d1d57356d6 -r 5676ee249d42 sys/dev/scsipi/sd.c
--- a/sys/dev/scsipi/sd.c       Tue Sep 21 03:08:18 1999 +0000
+++ b/sys/dev/scsipi/sd.c       Tue Sep 21 03:10:00 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sd.c,v 1.147 1999/09/11 21:42:58 thorpej Exp $ */
+/*     $NetBSD: sd.c,v 1.148 1999/09/21 03:10:00 enami Exp $   */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -93,6 +93,7 @@
 
 #define        SDUNIT(dev)                     DISKUNIT(dev)
 #define        SDPART(dev)                     DISKPART(dev)
+#define        SDMINOR(unit, part)             DISKMINOR(unit, part)
 #define        MAKESDDEV(maj, unit, part)      MAKEDISKDEV(maj, unit, part)
 
 #define        SDLABELDEV(dev) (MAKESDDEV(major(dev), SDUNIT(dev), RAW_PART))
@@ -277,7 +278,7 @@
        splx(s);
 
        /* Nuke the the vnodes for any open instances */
-       mn = self->dv_unit;
+       mn = SDMINOR(self->dv_unit, 0);
        vdevgone(bmaj, mn, mn + (MAXPARTITIONS - 1), VBLK);
        vdevgone(cmaj, mn, mn + (MAXPARTITIONS - 1), VCHR);
 



Home | Main Index | Thread Index | Old Index