1.\" $NetBSD: fd.4,v 1.12 2010/03/22 18:58:31 joerg Exp $ 2.\" 3.\" Copyright (c) 1996 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Paul Kranenburg. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd May 12, 2007 31.Dt FD 4 sparc 32.Os 33.Sh NAME 34.Nm fd , 35.Nm fdc 36.Nd Sun SPARCstation i82072 or i82077 floppy disk controller driver 37.Sh SYNOPSIS 38.Cd "fdc0 at mainbus0" Pq sun4c 39.Cd "fdc0 at obio0" Pq sun4m 40.Cd "fd* at fdc0" 41.Sh DESCRIPTION 42This is the driver for the built-in floppy disk drive run by the 43.Tn Intel 44i82072 or i82077 controller chip found on the SPARCstation desktop 45systems, and other 46.Tn SPARC 47systems. 48.Pp 49Bits 50.Bq 0-3 51of the minor device number of the special files referring to this 52device encode the floppy density as follows: 53.Bl -tag -width indent -offset indent 54.It 0 553.5'' 1.44MB floppy diskettes. 56.It 1 573.5'' 720KB floppy diskettes. 58.It 2 593.5'' 360KB floppy diskettes. 60.It 3 613.5'' 1.2MB/NEC Japanese format floppy diskettes. 62.El 63.Sh FORMATTING 64The driver supports floppy disk formatting using the interfaces in 65.In sys/fdio.h : 66.Pp 67.Bl -tag -width FDIOCFORMAT_TRACK -compact 68.It Dv FDIOCGETFORMAT Fa struct fdformat_parms 69Fetch current formatting parameters. 70This gets the default parameters 71for the open device if no parameters have been set during the session. 72.Pp 73.It Dv FDIOCSETFORMAT Fa struct fdformat_parms 74Set formatting parameters. 75The driver saves this state and it persists while the device is open. 76.Pp 77.It Dv FDIOCFORMAT_TRACK Fa struct fdformat_cmd 78Format a track on the medium. 79If this call returns 80.Er EINVAL , 81the track formatting parameters were out of range for the medium. 82If it returns 83.Er EIO , 84there was a medium error while formatting the track. 85.Pp 86.It Dv FDIOCSETOPTS Fa int 87Set driver options which persist until the device is closed. 88The 89options should be the logical OR of the desired values below: 90.Pp 91.Bl -tag -width FDOPT_NORETRY -compact 92.It Dv FDOPT_NORETRY 93Do not retry operations on failure 94.It Dv FDOPT_SILENT 95Do not print error messages to the console 96.El 97.Pp 98.It Dv FDIOCGETOPTS Fa int 99Fetch drive options. 100.El 101.Pp 102A typical use of the formatting facilities would be to open the device, 103call 104.Dv FDIOCGETFORMAT 105to fetch the current format parameters, perhaps 106change a parameter or two, display the formatting details to the user, 107and then call 108.Dv FDIOCSETFORMAT 109followed by a series of calls to 110.Dv FDIOCFORMAT_TRACK . 111.Sh SEE ALSO 112.Xr eject 1 , 113.Xr fdformat 1 114.Sh HISTORY 115The 116.Nm 117formatting support appeared in 118.Nx 1.3 . 119