Bug 77 - Floppy driver gets NULL "%s" arg during errors
Summary: Floppy driver gets NULL "%s" arg during errors
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: FreeBSD Core Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1994-12-20 17:30 UTC by Peter Dufault
Modified: 2001-11-28 02:41 UTC (History)
0 users

See Also:


Attachments
file.diff (282 bytes, patch)
1994-12-20 17:30 UTC, Peter Dufault
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Dufault 1994-12-20 17:30:05 UTC
When the floppy gets errors it winds up passing a NULL argument down
to the disk error logger.

Fix: The kernel printf should be more forgiving of this particular slip.
Error messages are too infrequently tested to be confident that
all of them are in good shape. I think this should be applied, in
addition to tracking down the floppy problem.
How-To-Repeat: 
Start a "dd if=/dev/fd0a of=/dev/null bs=512" and then pop out the
floppy.  You will see this:

> Dec 20 02:36:36 hda kernel: fd0<null>c: hard error reading fsbn 1354 of
> 1352-1355 (ST0 c0<invld,abnrml>  ST1 20<bad_crc>  ST2 20<bad_crc> cyl 37
> hd 1 sec 5)
> Dec 20 02:36:36 hda kernel: fd0: recal failed ST0 80<invld> cyl -1
> Dec 20 02:36:36 hda kernel: fd0<null>c: hard error reading fsbn 1352 of
> 1352-1355 (ST0
> ffffffff<invld,abnrml,seek_cmplt,equ_chck,drive_notrdy,top_head>  ST1
> ffffffff<end_of_cyl,bad_crc,data_overrun,sec_not_fnd,write_protect,no_am>
> ST2
> ffffffff<ctrl_mrk,bad_crc,wrong_cyl,scn_eq,scn_not_fnd,bad_cyl,no_dam>
> cyl

if you apply the patch in the next section.  (without it you'll panic at
each "<null>"
Comment 1 Joerg Wunsch freebsd_committer freebsd_triage 1995-01-12 19:36:24 UTC
State Changed
From-To: open->closed

This failure has been caused by bad code in diskerr(), which has already 
been fixed by Bruce Evans.