Subject: Re: bin/12475: "eject floppy" on SS2 prints "error reading fsbn 0" before ejecting
To: None <tma@osa.com.au>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-bugs
Date: 03/26/2001 20:14:59
On Sun, Mar 25, 2001 at 05:21:12PM -0800, tma@osa.com.au wrote:
> 
> >Number:         12475
> >Category:       bin
> >Synopsis:       "eject floppy" on SS2 prints "error reading fsbn 0" before ejecting
> >Confidential:   no
> >Severity:       non-critical
> >Priority:       medium
> >Responsible:    bin-bug-people
> >State:          open
> >Class:          sw-bug
> >Submitter-Id:   net
> >Arrival-Date:   Sun Mar 25 17:22:00 PST 2001
> >Closed-Date:
> >Last-Modified:
> >Originator:     Tim Adam
> >Release:        1.5 release Sparc binary sets
> >Organization:
> Open Software Associates
> >Environment:
> SparcStation 2 (sun4c) GENERIC 1.5 release kernel
> >Description:
> "eject -v floppy" shows that the device being ejected is /dev/rfd0c.
> This is incorrect since that device is not the raw partition like on
> other disks but signifies a 720 KB floppy (see arch/sparc/dev/fd.c)
> "eject /dev/rfd0a" works fine, but floppy should be an alias for this.

And what if you really have a 720 KB is the drive ?

> 
> >How-To-Repeat:
> Run 1.5 release install from SPARC boot floppies
> Watch for error message while 1st floppy is ejected
> 
> or just boot 1.5, insert 1.44 MB diskette and run "eject floppy"
> 
> >Fix:
> Removing the following line from nick2rdev() in usr.bin/eject.c:
> 	devname[strlen(devname) - 1] += RAW_PART;
> fixes it in the case of a floppy disk but I don't know the impact
> of this change on other types of removable disk.

This'll break all other removable disk (zip, cd, etc ...)

The real fix for this is to permit opening the floppy device without
printing the error message (or maybe without read at all).

--
Manuel Bouyer <bouyer@antioche.eu.org>
--