diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2004-05-09 05:34:01 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2004-05-09 05:34:01 +0000 |
commit | 23d32038c454aebfcf199160132412aaa53a7d26 (patch) | |
tree | 18aedeec8003e279fc0238ddd741e9112f69164c /sys | |
parent | 641fdb00a006aacea6967546d45f479fe607883f (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')
-rw-r--r-- | sys/arch/mvme68k/dev/vs.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/dev/vs.c | 4 | ||||
-rw-r--r-- | sys/scsi/scsi_base.c | 54 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 4 |
4 files changed, 9 insertions, 57 deletions
diff --git a/sys/arch/mvme68k/dev/vs.c b/sys/arch/mvme68k/dev/vs.c index bfa6f6a01c0..d3d31f4fc59 100644 --- a/sys/arch/mvme68k/dev/vs.c +++ b/sys/arch/mvme68k/dev/vs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vs.c,v 1.14 2004/01/20 16:48:23 miod Exp $ */ +/* $OpenBSD: vs.c,v 1.15 2004/05/09 05:34:00 krw Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. @@ -443,7 +443,7 @@ vs_chksense(xs) */ xs->status = riopb->iopb_STATUS >> 8; #ifdef SDEBUG - scsi_print_sense(xs, 2); + scsi_print_sense(xs); #endif splx(s); } diff --git a/sys/arch/mvme88k/dev/vs.c b/sys/arch/mvme88k/dev/vs.c index 5b1248f3293..cc4f9a9c6aa 100644 --- a/sys/arch/mvme88k/dev/vs.c +++ b/sys/arch/mvme88k/dev/vs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vs.c,v 1.33 2004/04/30 19:08:02 miod Exp $ */ +/* $OpenBSD: vs.c,v 1.34 2004/05/09 05:34:00 krw Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. @@ -494,7 +494,7 @@ vs_chksense(xs) */ xs->status = riopb->iopb_STATUS >> 8; #ifdef SDEBUG - scsi_print_sense(xs, 2); + scsi_print_sense(xs); #endif splx(s); } 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 * diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 32d6c7e41a5..b046e2c7157 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.43 2004/04/18 00:49:29 krw Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.44 2004/05/09 05:33:59 krw Exp $ */ /* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */ /* @@ -351,7 +351,7 @@ int scsi_do_safeioctl(struct scsi_link *, dev_t, u_long, caddr_t, void sc_print_addr(struct scsi_link *); void show_scsi_xs(struct scsi_xfer *); -void scsi_print_sense(struct scsi_xfer *, int); +void scsi_print_sense(struct scsi_xfer *); void show_scsi_cmd(struct scsi_xfer *); void show_mem(u_char *, int); int scsi_probe_busses(int, int, int); |