diff options
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/scsi_base.c | 54 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 4 |
2 files changed, 5 insertions, 53 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 * 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); |