105 lines
3.8 KiB
Groff
105 lines
3.8 KiB
Groff
.\" Copyright (c) 1996 John T. Kohl
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" 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. The name of the author may not be used to endorse or promote products
|
|
.\" derived from this software without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
|
.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 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.
|
|
.\"
|
|
.\" $NetBSD: fdc.4,v 1.1 1996/11/29 16:33:07 jtk Exp $
|
|
.\"
|
|
.Dd November 28, 1996
|
|
.Dt FDC 4 i386
|
|
.Os NetBSD
|
|
.Sh NAME
|
|
.Nm fdc
|
|
.Nd NEC 765 floppy disk controller driver
|
|
.Sh SYNOPSIS
|
|
.Cd "fdc0 at isa? port 0x3f0 irq 6 drq 2"
|
|
.Cd "fd* at fdc? drive ?"
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm
|
|
driver provides support for the NEC 765 floppy disk controller and
|
|
floppy disk drives, commonly found on IBM-PC compatible systems.
|
|
.Pp
|
|
The driver supports the following floppy diskette formats by using
|
|
particular partitions:
|
|
.Bl -tag -width -offset indent -compact
|
|
.It 1.44MB 3.5-inch (b)
|
|
.It "1.2MB " 5.25-inch (c)
|
|
.It "360KB " 3.5-inch (1.2MB drive) (d)
|
|
.It "360KB " 3.5-inch (IBM-PC drive) (e)
|
|
.It "720KB " 3.5-inch (f)
|
|
.It "720KB " 5.25-inch (g)
|
|
.It "360KB " 3.5-inch (h)
|
|
.El
|
|
Partition
|
|
.Ar a
|
|
selects the default format for the attached floppy drive, as determined
|
|
by the BIOS configuration for the diskette drive.
|
|
.Sh FORMATTING
|
|
The driver supports floppy disk formatting using the interfaces in
|
|
.Pa Aq sys/fdio.h :
|
|
.Bl -tag -width FDIOCFORMAT_TRACK -compact
|
|
.It Dv FDIOCGETFORMAT Fa struct fdformat_parms
|
|
Fetch current formatting parameters. This gets the default parameters
|
|
for the open device if no parameters have been set during the session.
|
|
.It Dv FDIOCSETFORMAT Fa struct fdformat_parms
|
|
Set formatting parameters.
|
|
The driver saves this state and it persists while the device is open.
|
|
.It Dv FDIOCFORMAT_TRACK Fa struct fdformat_cmd
|
|
Format a track on the medium.
|
|
If this call returns
|
|
.Em EINVAL ,
|
|
the track formatting parameters were out of range for the medium.
|
|
If it returns
|
|
.Em EIO ,
|
|
there was a medium error while formatting the track.
|
|
.It Dv FDIOCSETOPTS int
|
|
Set driver options which persist until the device is closed. The
|
|
options should be the logical OR of the desired values below:
|
|
.Bl -tag -width FDOPT_NORETRY -compact
|
|
.It FDOPT_NORETRY
|
|
Do not retry operations on failure
|
|
.It FDOPT_SILENT
|
|
Do not print error messages to the console
|
|
.El
|
|
.It Dv FDIOCGETOPTS Fa int
|
|
Fetch drive options.
|
|
.El
|
|
.Pp
|
|
A typical use of the formatting facilities would be to open the device,
|
|
call
|
|
.Cm FDIOCGETFORMAT
|
|
to fetch the current format parameters, perhaps
|
|
change a parameter or two, display the formatting details to the user,
|
|
and then call
|
|
.Cm FDIOCSETFORMAT
|
|
followed by a series of calls to
|
|
.Cm FDIOCFORMAT_TRACK .
|
|
.Sh SEE ALSO
|
|
.Xr fdformat 8 .
|
|
.Sh HISTORY
|
|
The
|
|
.Nm
|
|
formatting support appeared in NetBSD-1.3.
|