xref: /netbsd-src/share/man/man4/man4.sparc/fd.4 (revision 2a399c6883d870daece976daec6ffa7bb7f934ce)
1.\"	$NetBSD: fd.4,v 1.4 1997/11/12 00:49:42 mrg 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.\" 3. All advertising materials mentioning features or use of this software
18.\"    must display the following acknowledgement:
19.\"        This product includes software developed by the NetBSD
20.\"        Foundation, Inc. and its contributors.
21.\" 4. Neither the name of The NetBSD Foundation nor the names of its
22.\"    contributors may be used to endorse or promote products derived
23.\"    from this software without specific prior written permission.
24.\"
25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35.\" POSSIBILITY OF SUCH DAMAGE.
36.\"
37.Dd June 23, 1996
38.Dt FD 4 sparc
39.Os
40.Sh NAME
41.Nm fd ,
42.Nm fdc
43.Nd Sparcstation floppy drive
44.Sh SYNOPSIS
45.Cd "fdc0 at mainbus0" Pq sun4c
46.Cd "fdc0 at obio0" Pq sun4m
47.Cd "fd* at fdc0"
48.Sh DESCRIPTION
49This is the driver for the built-in disquette station found on the
50Sparcstation 1, and (optionally) other desktop Sparc systems.
51.Pp
52Bits
53.Bq 0-3
54of the minor device number of the special files referring to this
55device encode the floppy density as follows:
56.Bl -tag -width indent -offset indent
57.It 0
583.5'' 1.44MB disquettes.
59.It 1
603.5'' 720KB disquettes.
61.It 2
623.5'' 360KB disquettes.
63.It 3
643.5'' 1.2MB/NEC Japanese format disquettes.
65.El
66.Sh FORMATTING
67The driver supports floppy disk formatting using the interfaces in
68.Pa Aq sys/fdio.h :
69.Pp
70.Bl -tag -width FDIOCFORMAT_TRACK -compact
71.It Dv FDIOCGETFORMAT Fa struct fdformat_parms
72Fetch current formatting parameters.  This gets the default parameters
73for the open device if no parameters have been set during the session.
74.Pp
75.It Dv FDIOCSETFORMAT Fa struct fdformat_parms
76Set formatting parameters.
77The driver saves this state and it persists while the device is open.
78.Pp
79.It Dv FDIOCFORMAT_TRACK Fa struct fdformat_cmd
80Format a track on the medium.
81If this call returns
82.Er EINVAL ,
83the track formatting parameters were out of range for the medium.
84If it returns
85.Er EIO ,
86there was a medium error while formatting the track.
87.Pp
88.It Dv FDIOCSETOPTS Fa int
89Set driver options which persist until the device is closed.  The
90options should be the logical OR of the desired values below:
91.Pp
92.Bl -tag -width FDOPT_NORETRY -compact
93.It Dv FDOPT_NORETRY
94Do not retry operations on failure
95.It Dv FDOPT_SILENT
96Do not print error messages to the console
97.El
98.Pp
99.It Dv FDIOCGETOPTS Fa int
100Fetch drive options.
101.El
102.Pp
103A typical use of the formatting facilities would be to open the device,
104call
105.Dv FDIOCGETFORMAT
106to fetch the current format parameters, perhaps
107change a parameter or two, display the formatting details to the user,
108and then call
109.Dv FDIOCSETFORMAT
110followed by a series of calls to
111.Dv FDIOCFORMAT_TRACK .
112.Sh SEE ALSO
113.Xr eject 1 ,
114.Xr fdformat 1 .
115.Sh BUGS
116Formatting appears to not work reliably on all machines.
117.Sh HISTORY
118The
119.Nm
120formatting support appeared in
121.Nx 1.3 .
122