Bug 222103

Summary: cd0: Attempt
Product: Base System Reporter: Edward Tomasz Napierala <trasz>
Component: kernAssignee: Edward Tomasz Napierala <trasz>
Status: Closed FIXED    
Severity: Affects Some People CC: trasz
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Edward Tomasz Napierala freebsd_committer freebsd_triage 2017-09-06 15:20:51 UTC
The r317143 broke cd(4) announcing at system boot time.  It looks like this:

cd0 at ahcich1 bus 0 scbus1 target 0 lun 0
cd0: <HL-DT-ST DVDRAM GT50N LT20> Removable CD-ROM SCSI device
cd0: Serial Number M36C37K4101
cd0: 150.000MB/s transfers (SATA 1.x, UDMA2, ATAPI 12bytes, PIO 8192bytes)
cd0: Attempt

Note the last line.  I believe it's because it uses sizeof(announce_buf),
and it's a pointer now, not a table.
Comment 1 Edward Tomasz Napierala freebsd_committer freebsd_triage 2018-02-14 14:13:40 UTC
Proposed fix in https://reviews.freebsd.org/D14369.
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-02-21 14:05:51 UTC
A commit references this bug:

Author: trasz
Date: Wed Feb 21 14:05:13 UTC 2018
New revision: 329708
URL: https://svnweb.freebsd.org/changeset/base/329708

Log:
  Use proper buffer length (the announce_buf char pointer used to be anarray),
  broken in r317143. This fixes those weird "cd0: Attempt" messages at boot.

  PR:		222103
  Reviewed by:	scottl@
  MFC after:	2 weeks
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D14369

Changes:
  head/sys/cam/scsi/scsi_cd.c