1.\" $NetBSD: fd.4,v 1.11 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 June 23, 1996 31.Dt FD 4 sun3 32.Os 33.Sh NAME 34.Nm fd 35.Nd Sun 3/80 i82027 floppy disk drive controller driver 36.Sh SYNOPSIS 37.Cd "fdc0 at obio0" Pq sun3x 38.Cd "fd* at fdc0" 39.Sh DESCRIPTION 40The 41.Nm 42driver is for the built-in floppy diskette drive run by the 43.Tn Intel 44i82027 controller found on the Sun 3/80. 45.Pp 46Bits 47.Bq 0-3 48of the minor device number of the special files referring to this 49device encode the floppy density as follows: 50.Bl -tag -width indent -offset indent 51.It 0 523.5'' 1.44MB floppy diskettes. 53.It 1 543.5'' 720KB floppy diskettes. 55.It 2 563.5'' 360KB floppy diskettes. 57.It 3 583.5'' 1.2MB/NEC Japanese format floppy diskettes. 59.El 60.Sh FORMATTING 61The driver supports floppy disk formatting using the interfaces in 62.In sys/fdio.h : 63.Pp 64.Bl -tag -width FDIOCFORMAT_TRACK -compact 65.It Dv FDIOCGETFORMAT Fa struct fdformat_parms 66Fetch current formatting parameters. 67This gets the default parameters 68for the open device if no parameters have been set during the session. 69.Pp 70.It Dv FDIOCSETFORMAT Fa struct fdformat_parms 71Set formatting parameters. 72The driver saves this state and it persists while the device is open. 73.Pp 74.It Dv FDIOCFORMAT_TRACK Fa struct fdformat_cmd 75Format a track on the medium. 76If this call returns 77.Er EINVAL , 78the track formatting parameters were out of range for the medium. 79If it returns 80.Er EIO , 81there was a medium error while formatting the track. 82.Pp 83.It Dv FDIOCSETOPTS Fa int 84Set driver options which persist until the device is closed. 85The 86options should be the logical OR of the desired values below: 87.Pp 88.Bl -tag -width FDOPT_NORETRY -compact 89.It Dv FDOPT_NORETRY 90Do not retry operations on failure 91.It Dv FDOPT_SILENT 92Do not print error messages to the console 93.El 94.Pp 95.It Dv FDIOCGETOPTS Fa int 96Fetch drive options. 97.El 98.Pp 99A typical use of the formatting facilities would be to open the device, 100call 101.Dv FDIOCGETFORMAT 102to fetch the current format parameters, perhaps 103change a parameter or two, display the formatting details to the user, 104and then call 105.Dv FDIOCSETFORMAT 106followed by a series of calls to 107.Dv FDIOCFORMAT_TRACK . 108.Sh SEE ALSO 109.Xr eject 1 , 110.Xr fdformat 1 111.Sh HISTORY 112The 113.Nm 114formatting support appeared in 115.Nx 1.3 . 116.Sh BUGS 117Formatting appears to not work reliably on all machines. 118