Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/scsipi Slightly simplicy the SCSI device attachment ...



details:   https://anonhg.NetBSD.org/src/rev/3c6dc89022dd
branches:  trunk
changeset: 537680:3c6dc89022dd
user:      soren <soren%NetBSD.org@localhost>
date:      Fri Oct 04 17:53:33 2002 +0000

description:
Slightly simplicy the SCSI device attachment message:
- Use the plain words 'disk' and 'tape' instead of 'direct' and 'sequential'.
- Media status will be printed in the frontend, so don't bother with it.
- Don't bother printing the SCSI version, which is fixed these days, or the
  numberic device type.

diffstat:

 sys/dev/scsipi/scsiconf.c   |  38 +++++++-------------------------------
 sys/dev/scsipi/scsipiconf.c |   8 ++++----
 2 files changed, 11 insertions(+), 35 deletions(-)

diffs (102 lines):

diff -r 5a056af94b45 -r 3c6dc89022dd sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Fri Oct 04 17:14:48 2002 +0000
+++ b/sys/dev/scsipi/scsiconf.c Fri Oct 04 17:53:33 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsiconf.c,v 1.192 2002/10/02 16:52:52 thorpej Exp $   */
+/*     $NetBSD: scsiconf.c,v 1.193 2002/10/04 17:53:33 soren Exp $     */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.192 2002/10/02 16:52:52 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.193 2002/10/04 17:53:33 soren Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -398,7 +398,7 @@
        struct scsipibus_attach_args *sa = aux;
        struct scsipi_inquiry_pattern *inqbuf;
        u_int8_t type;
-       const char *dtype, *qtype;
+       const char *dtype;
        char vendor[33], product[65], revision[17];
        int target, lun;
 
@@ -411,39 +411,15 @@
        lun = sa->sa_periph->periph_lun;
        type = inqbuf->type & SID_TYPE;
 
-       /*
-        * Figure out basic device type and qualifier.
-        */
-       dtype = 0;
-       switch (inqbuf->type & SID_QUAL) {
-       case SID_QUAL_LU_PRESENT:
-               qtype = "";
-               break;
-
-       case SID_QUAL_LU_NOTPRESENT:
-               qtype = " offline";
-               break;
-
-       case SID_QUAL_reserved:
-       case SID_QUAL_LU_NOT_SUPP:
-               panic("scsibusprint: impossible qualifier");
-
-       default:
-               qtype = "";
-               dtype = "vendor-unique";
-               break;
-       }
-       if (dtype == NULL)
-               dtype = scsipi_dtype(type);
+       dtype = scsipi_dtype(type);
 
        scsipi_strvis(vendor, 33, inqbuf->vendor, 8);
        scsipi_strvis(product, 65, inqbuf->product, 16);
        scsipi_strvis(revision, 17, inqbuf->revision, 4);
 
-       printf(" target %d lun %d: <%s, %s, %s> SCSI%d %d/%s %s%s",
-           target, lun, vendor, product, revision,
-           sa->scsipi_info.scsi_version & SID_ANSII, type, dtype,
-           inqbuf->removable ? "removable" : "fixed", qtype);
+       printf(" target %d lun %d: <%s, %s, %s> %s %s",
+           target, lun, vendor, product, revision, dtype,
+           inqbuf->removable ? "removable" : "fixed");
 
        return (UNCONF);
 }
diff -r 5a056af94b45 -r 3c6dc89022dd sys/dev/scsipi/scsipiconf.c
--- a/sys/dev/scsipi/scsipiconf.c       Fri Oct 04 17:14:48 2002 +0000
+++ b/sys/dev/scsipi/scsipiconf.c       Fri Oct 04 17:53:33 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipiconf.c,v 1.17 2002/01/12 16:37:55 tsutsui Exp $  */
+/*     $NetBSD: scsipiconf.c,v 1.18 2002/10/04 17:53:35 soren Exp $    */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsipiconf.c,v 1.17 2002/01/12 16:37:55 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipiconf.c,v 1.18 2002/10/04 17:53:35 soren Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -193,10 +193,10 @@
 
        switch (type) {
        case T_DIRECT:
-               dtype = "direct";
+               dtype = "disk";
                break;
        case T_SEQUENTIAL:
-               dtype = "sequential";
+               dtype = "tape";
                break;
        case T_PRINTER:
                dtype = "printer";



Home | Main Index | Thread Index | Old Index