From 3a89aff59e146a890e4f7e53a24e43a4b63d06d2 Mon Sep 17 00:00:00 2001 From: soren Date: Fri, 4 Oct 2002 17:53:33 +0000 Subject: [PATCH] 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. --- sys/dev/scsipi/scsiconf.c | 38 +++++++------------------------------ sys/dev/scsipi/scsipiconf.c | 8 ++++---- 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/sys/dev/scsipi/scsiconf.c b/sys/dev/scsipi/scsiconf.c index 88999b718c6b..0486a808a992 100644 --- a/sys/dev/scsipi/scsiconf.c +++ b/sys/dev/scsipi/scsiconf.c @@ -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 -__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 #include @@ -398,7 +398,7 @@ scsibusprint(aux, pnp) 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 @@ scsibusprint(aux, pnp) 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 --git a/sys/dev/scsipi/scsipiconf.c b/sys/dev/scsipi/scsipiconf.c index c256c71c5993..0d9cf8f333c2 100644 --- a/sys/dev/scsipi/scsipiconf.c +++ b/sys/dev/scsipi/scsipiconf.c @@ -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 -__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 #include @@ -193,10 +193,10 @@ scsipi_dtype(type) switch (type) { case T_DIRECT: - dtype = "direct"; + dtype = "disk"; break; case T_SEQUENTIAL: - dtype = "sequential"; + dtype = "tape"; break; case T_PRINTER: dtype = "printer";