summaryrefslogtreecommitdiff
path: root/sys/scsi/scsi_base.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2004-05-09 05:34:01 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2004-05-09 05:34:01 +0000
commit23d32038c454aebfcf199160132412aaa53a7d26 (patch)
tree18aedeec8003e279fc0238ddd741e9112f69164c /sys/scsi/scsi_base.c
parent641fdb00a006aacea6967546d45f479fe607883f (diff)
Eliminate verbosity parameter to scsi_print_sense and the associated
chunk of code. It was never executed unless you were debugging a mvmex8k 'vs' device. ok miod@ (mvmex8k bits) marco@ deraadt@
Diffstat (limited to 'sys/scsi/scsi_base.c')
-rw-r--r--sys/scsi/scsi_base.c54
1 files changed, 3 insertions, 51 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index a3abddd17b4..1bd2e9c874b 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.57 2004/05/09 04:01:59 krw Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.58 2004/05/09 05:33:59 krw Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -790,7 +790,7 @@ scsi_interpret_sense(xs)
}
if (key && (xs->flags & SCSI_SILENT) == 0)
- scsi_print_sense(xs, 0);
+ scsi_print_sense(xs);
return error;
@@ -1439,12 +1439,10 @@ asc2ascii(asc, ascq, result, len)
#endif /* SCSITERSE */
void
-scsi_print_sense(xs, verbosity)
+scsi_print_sense(xs)
struct scsi_xfer *xs;
- int verbosity;
{
int32_t info;
- register int i, j, k;
char *sbs, *s;
sc_print_addr(xs->sc_link);
@@ -1509,52 +1507,6 @@ scsi_print_sense(xs, verbosity)
sbs = scsi_decode_sense(s, DECODE_SKSV);
if (strlen(sbs) > 0)
printf(" SKSV: %s\n", sbs);
- if (verbosity == 0)
- return;
-
- /*
- * Now figure whether we should print any additional informtion.
- *
- * Where should we start from? If we had SKSV data,
- * start from offset 18, else from offset 15.
- *
- * From that point until the end of the buffer, check for any
- * nonzero data. If we have some, go back and print the lot,
- * otherwise we're done.
- */
- if (strlen(sbs) > 0)
- i = 18;
- else
- i = 15;
-
- for (j = i; j < sizeof (xs->sense); j++)
- if (s[j])
- break;
- if (j == sizeof (xs->sense))
- return;
-
- printf(" Additional Sense Information (byte %d out...):\n", i);
- if (i == 15) {
- printf(" %2d:", i);
- k = 7;
- } else {
- printf(" %2d:", i);
- k = 2;
- j -= 2;
- }
- while (j > 0) {
- if (i >= sizeof (xs->sense))
- break;
- if (k == 8) {
- k = 0;
- printf("\n %2d:", i);
- }
- printf(" 0x%02x", s[i] & 0xff);
- k++;
- j--;
- i++;
- }
- printf("\n");
}
char *