diff options
author | dufault <dufault@FreeBSD.org> | 1995-03-21 11:21:08 +0000 |
---|---|---|
committer | dufault <dufault@FreeBSD.org> | 1995-03-21 11:21:08 +0000 |
commit | 274a8d5ee2f5e2f80b359cbb60feedce7879b4fe (patch) | |
tree | c976e70835fd9cfefdf009bac7ee768f44b8b8b0 /sys/scsi/scsi_base.c | |
parent | 0d274572e35245942a094cbb30772453c9a4c109 (diff) | |
download | FreeBSD-src-274a8d5ee2f5e2f80b359cbb60feedce7879b4fe.zip FreeBSD-src-274a8d5ee2f5e2f80b359cbb60feedce7879b4fe.tar.gz |
cd.c: Julian's CD audio cleanup
sd.c: Julian's removal of subdriver requests
st.c, scsi_tape.h: Julian's suport of compressed tape drives
Note: compressed tape drives are still not working fully.
scsiconf.h, scsi_base.c, scsi_driver.c: address problems in probes
and error console logs
Diffstat (limited to 'sys/scsi/scsi_base.c')
-rw-r--r-- | sys/scsi/scsi_base.c | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 5e50f7a..4cae78d 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -8,7 +8,7 @@ * file. * * Written by Julian Elischer (julian@dialix.oz.au) - * $Id: scsi_base.c,v 1.22 1995/03/15 14:22:05 dufault Exp $ + * $Id: scsi_base.c,v 1.23 1995/03/15 14:44:01 dufault Exp $ */ #define SPLSD splbio @@ -646,7 +646,7 @@ retry: /* * scsi_sense_print will decode the sense data into human * readable form. Sense handlers can use this to generate - * a report. This DOES NOT send the closing "\n". + * a report. This NOW DOES send the closing "\n". */ void scsi_sense_print(xs) struct scsi_xfer *xs; @@ -727,7 +727,15 @@ void scsi_sense_print(xs) ascq = (ext->extra_len >= 6) ? ext->add_sense_code_qual : 0; if (asc || ascq) - printf(" asc:%x,%x %s", asc, ascq, scsi_sense_desc(asc, ascq)); + { + char *desc = scsi_sense_desc(asc, ascq); + printf(" asc:%x,%x", asc, ascq); + + if (strlen(desc) > 40) + sc_print_addr(xs->sc_link);; + + printf("%s", desc); + } if (ext->extra_len >= 7 && ext->fru) { printf(" fru:%x", ext->fru); @@ -754,6 +762,8 @@ void scsi_sense_print(xs) ((unsigned long)sense->ext.unextended.blocklow)); } } + + printf("\n"); } /* @@ -840,7 +850,6 @@ scsi_interpret_sense(xs) if (!silent) { scsi_sense_print(xs); - printf("\n"); } switch (sense->error_code & SSD_ERRCODE) { @@ -849,7 +858,6 @@ scsi_interpret_sense(xs) */ if (silent) { scsi_sense_print(xs); - printf("\n"); } /* BUG: @@ -999,6 +1007,21 @@ scsi_4btou(bytes) return rc; } +static sc_printing; + +void +sc_print_start(sc_link) + struct scsi_link *sc_link; +{ + sc_print_addr(sc_link); + sc_printing = 1; +} +void +sc_print_finish() +{ + sc_printing = 0; +} + /* * Print out the scsi_link structure's address info. */ @@ -1007,6 +1030,9 @@ void sc_print_addr(sc_link) struct scsi_link *sc_link; { + if (sc_printing) + printf("\n"); + if (strcmp(sc_link->device->name, "probe") != 0) printf("%s%d", sc_link->device->name, sc_link->dev_unit); |