2003-06-27 22:47:54 +04:00
|
|
|
.\" $NetBSD: fd.4,v 1.9 2003/06/27 18:47:54 wiz Exp $
|
1996-06-23 01:35:14 +04:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
.\" by Paul Kranenburg.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the NetBSD
|
|
|
|
.\" Foundation, Inc. and its contributors.
|
|
|
|
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
.\" contributors may be used to endorse or promote products derived
|
|
|
|
.\" from this software without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
1998-06-11 13:03:45 +04:00
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
1997-10-09 01:59:52 +04:00
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
1996-06-23 01:35:14 +04:00
|
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.Dd June 23, 1996
|
1997-10-23 03:08:22 +04:00
|
|
|
.Dt FD 4 sun3
|
1996-06-23 01:35:14 +04:00
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm fd
|
1998-06-11 13:03:45 +04:00
|
|
|
.Nd Sun 3/80 i82027 floppy disk drive controller driver
|
1996-06-23 01:35:14 +04:00
|
|
|
.Sh SYNOPSIS
|
1997-10-23 03:08:22 +04:00
|
|
|
.Cd "fdc0 at obio0" Pq sun3x
|
1996-06-23 01:35:14 +04:00
|
|
|
.Cd "fd* at fdc0"
|
|
|
|
.Sh DESCRIPTION
|
2001-09-12 02:52:52 +04:00
|
|
|
The
|
1998-06-11 13:03:45 +04:00
|
|
|
.Nm
|
|
|
|
driver is for the built-in floppy diskette drive run by the
|
|
|
|
.Tn Intel
|
|
|
|
i82027 controller found on the Sun 3/80.
|
1996-06-23 01:35:14 +04:00
|
|
|
.Pp
|
|
|
|
Bits
|
1997-10-20 04:28:33 +04:00
|
|
|
.Bq 0-3
|
1996-06-23 01:35:14 +04:00
|
|
|
of the minor device number of the special files referring to this
|
|
|
|
device encode the floppy density as follows:
|
|
|
|
.Bl -tag -width indent -offset indent
|
|
|
|
.It 0
|
1998-06-11 13:03:45 +04:00
|
|
|
3.5'' 1.44MB floppy diskettes.
|
1996-06-23 01:35:14 +04:00
|
|
|
.It 1
|
1998-06-11 13:03:45 +04:00
|
|
|
3.5'' 720KB floppy diskettes.
|
1997-10-20 04:28:33 +04:00
|
|
|
.It 2
|
1998-06-11 13:03:45 +04:00
|
|
|
3.5'' 360KB floppy diskettes.
|
1997-10-20 04:28:33 +04:00
|
|
|
.It 3
|
1998-06-11 13:03:45 +04:00
|
|
|
3.5'' 1.2MB/NEC Japanese format floppy diskettes.
|
1996-06-23 01:35:14 +04:00
|
|
|
.El
|
1997-10-20 04:28:33 +04:00
|
|
|
.Sh FORMATTING
|
|
|
|
The driver supports floppy disk formatting using the interfaces in
|
2003-06-27 22:47:54 +04:00
|
|
|
.Aq Pa sys/fdio.h :
|
1997-10-20 04:28:33 +04:00
|
|
|
.Pp
|
|
|
|
.Bl -tag -width FDIOCFORMAT_TRACK -compact
|
|
|
|
.It Dv FDIOCGETFORMAT Fa struct fdformat_parms
|
1998-06-11 13:03:45 +04:00
|
|
|
Fetch current formatting parameters.
|
|
|
|
This gets the default parameters
|
1997-10-20 04:28:33 +04:00
|
|
|
for the open device if no parameters have been set during the session.
|
|
|
|
.Pp
|
|
|
|
.It Dv FDIOCSETFORMAT Fa struct fdformat_parms
|
|
|
|
Set formatting parameters.
|
|
|
|
The driver saves this state and it persists while the device is open.
|
|
|
|
.Pp
|
|
|
|
.It Dv FDIOCFORMAT_TRACK Fa struct fdformat_cmd
|
|
|
|
Format a track on the medium.
|
|
|
|
If this call returns
|
|
|
|
.Er EINVAL ,
|
|
|
|
the track formatting parameters were out of range for the medium.
|
|
|
|
If it returns
|
|
|
|
.Er EIO ,
|
|
|
|
there was a medium error while formatting the track.
|
|
|
|
.Pp
|
|
|
|
.It Dv FDIOCSETOPTS Fa int
|
1998-06-11 13:03:45 +04:00
|
|
|
Set driver options which persist until the device is closed.
|
|
|
|
The
|
1997-10-20 04:28:33 +04:00
|
|
|
options should be the logical OR of the desired values below:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width FDOPT_NORETRY -compact
|
|
|
|
.It Dv FDOPT_NORETRY
|
|
|
|
Do not retry operations on failure
|
|
|
|
.It Dv FDOPT_SILENT
|
|
|
|
Do not print error messages to the console
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
.It Dv FDIOCGETOPTS Fa int
|
|
|
|
Fetch drive options.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
A typical use of the formatting facilities would be to open the device,
|
|
|
|
call
|
|
|
|
.Dv FDIOCGETFORMAT
|
|
|
|
to fetch the current format parameters, perhaps
|
|
|
|
change a parameter or two, display the formatting details to the user,
|
|
|
|
and then call
|
|
|
|
.Dv FDIOCSETFORMAT
|
|
|
|
followed by a series of calls to
|
|
|
|
.Dv FDIOCFORMAT_TRACK .
|
1996-06-23 01:35:14 +04:00
|
|
|
.Sh SEE ALSO
|
1997-10-20 04:28:33 +04:00
|
|
|
.Xr eject 1 ,
|
2000-07-05 20:13:43 +04:00
|
|
|
.Xr fdformat 1
|
1997-10-20 04:28:33 +04:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
formatting support appeared in
|
|
|
|
.Nx 1.3 .
|
2002-01-15 05:01:23 +03:00
|
|
|
.Sh BUGS
|
|
|
|
Formatting appears to not work reliably on all machines.
|