Subject: port-sparc/4390: sparc floppy driver could use a manpage
To: None <gnats-bugs@gnats.netbsd.org>
From: Eric Fischer <eric@fudge.uchicago.edu>
List: netbsd-bugs
Date: 10/29/1997 14:18:47
>Number:         4390
>Category:       port-sparc
>Synopsis:       sparc floppy undocumented and has confusing uses for partition names
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 29 12:35:03 1997
>Last-Modified:
>Originator:     Eric Fischer
>Organization:
	The University of Chicago
>Release:        1.2
>Environment:
System: NetBSD fudge 1.2 NetBSD 1.2 (FUDGE) #7: Sun Jan 19 16:26:56 CST 1997 eric@fudge:/usr/people/eric/usrsrc/sys/arch/sparc/compile/FUDGE sparc


>Description:
	The sparc floppy disk driver uses the partition letters to
	refer to disk capacities, not to partitions, but this isn't
	documented anywhere other than the source code.
>How-To-Repeat:
	newfs /dev/fd0c
	wonder why you only get 1.2mb
	curse at the lack of a manpage to tell you why
>Fix:
	Include a manpage for fd(4).  This isn't a very good one,
	but crummy documentation is better than none at all, I think.

.TH FD 4
.SH NAME
fd \- floppy disk devices
.SH CONFIG
fd* at fdc? drive ?
.SH DESCRIPTION
The
.B fd
device provides access to the Sparc floppy disk drive.
The block devices are named 
.B /dev/fd?[a-h]
and the raw
devices, 
.BR /dev/fd?[a-h] ,
but unlike the similarly named
.B sd
.SM SCSI
disk devices, the letter here refers not to a partition but
to the disk capacity.
The capacities supported are:
.LP
.TS
l l l l .
``partition''	sectors	cylinders	capacity
b	36	80	1.4MB
c	30	80	1.2MB
d	18	40	360K (in 1.2MB drive)
e	18	40	360K
f	18	80	720K
g	18	80	720K (in 1.2MB drive)
h	18	40	360K (in 720K drive)
.TE
.LP
Partition
.B a
is supposed to be the automatically detected capacity, but
in practice it is the same as
.BR b .
.SH IOCTLS
The
.B fd
driver recognizes the following ioctls, declared in <sys/dkio.h>:
.TP
.SM DIOCGDINFO
returns the disk label as a
.B struct disklabel
.TP
.SM DIOCWLABEL
does nothing, unless the disk is unwriteable, in which case it is an error
.TP
.SM DIOCWDINFO
sets the disk label to the
.B struct disklabel
provided
.TP
.SM DIOCLOCK
always succeeds
.TP
.SM DIOCEJECT
ejects the floppy disk
>Audit-Trail:
>Unformatted: