Subject: kern/2533: SCSI Configuration code can spew garbage strings
To: None <gnats-bugs@NetBSD.ORG>
From: The Terminator rAT <rat@Feeble-Gourmet.COM>
List: netbsd-bugs
Date: 06/09/1996 01:09:39
>Number:         2533
>Category:       kern
>Synopsis:       SCSI Configuration code can spew garbage strings
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun  9 04:20:02 1996
>Last-Modified:
>Originator:     System Rat
>Organization:
	The Feeble Gourmet
>Release:        NetBSD-1.2_Alpha around June 2, 1996
>Environment:
	
System: NetBSD coredump 1.2_ALPHA NetBSD 1.2_ALPHA (COREDUMP) #3: Sat Jun 8 20:24:52 PDT 1996 thorpej@coredump:/local/src/sys/arch/amiga/compile/COREDUMP amiga


>Description:
	Some SCSI drives return non-printable characters in strings.  The
	SCSI code attempts to deal with this by escaping these characters.
	The result is aesthetically disconcerting.  
>How-To-Repeat:
	Boot system with certain drives on SCSI bus.  i.e. my new IBM 
	CD-ROM Drive.
>Fix:
	Patch included below changes this:

cd0 at scsibus0 targ 6 lun 0: <IBM, CDRM00203\\000\\000\\000\\000\\000!J, 1.0m> SCSI2 5/cdrom removable

	into this :

cd0 at scsibus0 targ 6 lun 0: <IBM, CDRM00203!J, 1.0m> SCSI2 5/cdrom removable

------------------------------- %< Cut Here %< -------------------------------
*** /tmp/scsiconf.c	Sun Jun  9 00:58:43 1996
--- /sys/scsi/scsiconf.c	Sat Jun  8 20:22:21 1996
***************
*** 238,252 ****
--- 238,256 ----
  
  	while (len > 0) {
  		if (*src < 0x20 || *src >= 0x80) {
+ #if 0
  			/* non-printable characters */
  			*dst++ = '\\';
  			*dst++ = ((*src & 0300) >> 6) + '0';
  			*dst++ = ((*src & 0070) >> 3) + '0';
  			*dst++ = ((*src & 0007) >> 0) + '0';
+ #endif
  		} else if (*src == '\\') {
+ #if 0
  			/* quote characters */
  			*dst++ = '\\';
  			*dst++ = '\\';
+ #endif
  		} else {
  			/* normal characters */
  			*dst++ = *src;
>Audit-Trail:
>Unformatted: