Yuck, forgot to add `fdcontrol' in the Makefile along with
[unix-history] / usr.sbin / fdformat / fdformat.1
... / ...
CommitLineData
1.\" Copyright (C) 1993 by Joerg Wunsch, Dresden
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
14.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
17.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23.\" POSSIBILITY OF SUCH DAMAGE.
24.\"
25.Dd September 16, 1993
26.Os
27.Dt FDFORMAT 1
28.Sh NAME
29.Nm fdformat
30.Nd format floppy disks
31.Sh SYNOPSIS
32.Nm fdformat
33.Bq Fl q
34.Bq Fl v
35.Bq Fl n
36.Bq Fl f Ar capacity
37.Bq Fl c Ar cyls
38.Bq Fl s Ar secs
39.Bq Fl h Ar heads
40.br
41.Bq Fl r Ar rate
42.Bq Fl g Ar gap3len
43.Bq Fl i Ar intleave
44.Bq Fl S Ar secshft
45.Bq Fl F Ar fillbyte
46.Bq Fl t Ar steps_per_track
47.Ar device_name
48.Sh DESCRIPTION
49.Nm Fdformat
50formats a floppy disk at device
51.Ar device_name .
52.Ar Device_name
53should be a character device; it may be given either with a full path
54name of a raw device node for a floppy disk drive
55.Pq e.\ g. Pa /dev/rfd0 ,
56or default name in an abbreviated form
57.Pq e.\ g. Em fd0 .
58In the latter case, the name is constructed by prepending
59.Pa /dev/r
60and appending a
61.Em .capacity
62to the
63.Ar device_name .
64Note that any geometry constraints of the device node
65.Pq minor device number
66are meaningless, since they're overridden by
67.Nm fdformat .
68.Pp
69The options are as follows:
70.Bl -tag -width 10n -offset indent
71.It Fl q
72supress any normal output from the command, and don't ask the
73user for a confirmation whether to format the floppy disk at
74.Ar device_name .
75.It Fl f Ar capacity
76The normal way to specify the desired formatting parameters.
77.Ar Capacity
78is the number of kilobytes to format.
79.It Fl n
80Don't verify floppy after formatting.
81.It Fl v
82Don't format, verify only.
83.It Fl c Ar cyls
84.It Fl s Ar secs
85.It Fl h Ar heads
86.It Fl r Ar rate
87.It Fl g Ar gap3len
88.It Fl i Ar intleave
89.It Fl S Ar secshft
90.It Fl F Ar fillbyte
91.It Fl t Ar steps_per_track
92An alternate method to specify the geometry data to write to the floppy disk.
93.El
94
95If the
96.Fl q
97flag has not been specified, the user is asked for a confirmation
98of the intended formatting process. In order to continue, an answer
99of
100.Dq y
101must be given.
102.Sh DIAGNOSTICS
103Unless
104.Fl q
105has been specified, a single letter is printed to standard output
106to inform the user about the progress of work.
107First, an
108.Sq Em F
109is printed when the track(s) is being formatted, then a
110.Sq Em V
111while it's being verified, and if an error has been detected, it
112will finally change to
113.Sq Em E .
114.Pp
115An exit status of 0 is returned upon successful operation. Exit status
1161 is returned on any errors during floppy formatting, and an exit status
117of 2 reflects invalid arguments given to the program (along with an
118appropriate information written to diagnostic output).
119.Sh SEE ALSO
120.Xr fd 4 .
121.Sh HISTORY
122.Nm Fdformat
123has been developed for 386BSD 0.1
124and upgraded to the new
125.Xr fd 4
126floppy disk driver. It later became part of the
127.Em FreeBSD
128system, release 1.1.
129.Sh AUTHOR
130The program has been contributed by
131.if n Joerg Wunsch,
132.if t J\(:org Wunsch,
133Dresden, with changes by Serge Vakulenko and Andrew A. Chernov, Moscow.