diff options
author | Bill Paul <wpaul@FreeBSD.org> | 1997-02-08 03:42:22 +0000 |
---|---|---|
committer | Bill Paul <wpaul@FreeBSD.org> | 1997-02-08 03:42:22 +0000 |
commit | 9baa6352dced158938d2cdd13708798871f0fad2 (patch) | |
tree | 8f99ab8e81cd1f411a772d64448329afe3cea8f8 /sys/scsi/scsi_base.c | |
parent | 772dfa72317e96ba35345ee702925b52232f98c2 (diff) |
Make some small tweaks to the messages to clean up some stuff
from last time. Some people have pointed out that there were some odd
side-effects in the changes I made. Two things are different:
- sc_print_addr() will print 'foodev0:' (i.e. sd0:, st0:, cd0:, etc...)
if the device name is known. If it's not known, it'll use a longer
notation. This shortens error messages back to a sane length.
- Added a small function called sc_print_init() to set the sc_printing
flag so that sc_print_addr() will know that we want it to print a
linefeed. Used this in scsi_device_attach() to restore proper carriage
return printing behavior which I broke.
Remaining bogons: the NCR SCSI driver prints out information while the
device-specific attach routine is running with its own linefeeds. This
breaks up the individual messages emitted by the subdriver modules and
causes at least one message to appear on a line by itself without a
device spec prefix. I'm not sure of the correct way to fix this, and
I don't have any NCR SCSI hardware to test with anyway.
There's probably more, but I gather that a rewrite of the SCSI subsystem
is pending anyway, so I'll leave the rest to Those Who Know More About
This Than I (tm).
Notes
Notes:
svn path=/head/; revision=22419
Diffstat (limited to 'sys/scsi/scsi_base.c')
-rw-r--r-- | sys/scsi/scsi_base.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index e77dd9be9b08..3504b5a50709 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1199,6 +1199,12 @@ scsi_4btou(bytes) static sc_printing; void +sc_print_init() +{ + sc_printing++; +} + +void sc_print_start(sc_link) struct scsi_link *sc_link; { @@ -1245,11 +1251,12 @@ sc_print_addr(sc_link) printf("\n"); if (sc_link->device == 0) { - printf("nodevice"); + printf("nodevice at "); } else if (strcmp(sc_link->device->name, "probe") != 0) { printf("%s", sc_link->device->name); - id_put(sc_link->dev_unit, " at "); + id_put(sc_link->dev_unit, ": "); + return; } printf("scbus"); |