summaryrefslogtreecommitdiff
path: root/usr.sbin/fdformat/fdformat.1
blob: 1417e50ae2395308d533bf888d0fef25de98128b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
.\"	$OpenBSD: fdformat.1,v 1.18 2007/05/31 19:20:23 jmc Exp $
.\"
.\" Copyright (C) 1993, 1994 by Joerg Wunsch, Dresden
.\" 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.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``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(S) 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.
.\"
.Dd $Mdocdate: May 31 2007 $
.Dt FDFORMAT 1
.Os
.Sh NAME
.Nm fdformat
.Nd format floppy disks
.Sh SYNOPSIS
.Nm fdformat
.Bk -words
.Op Fl nqv
.Op Fl c Ar cyls
.Op Fl F Ar fillbyte
.Op Fl g Ar gap3len
.Op Fl h Ar heads
.Op Fl i Ar intleave
.Op Fl r Ar rate
.Op Fl S Ar secshft
.Op Fl s Ar secs
.Op Fl t Ar steps_per_track
.Ar device_name
.Ek
.Sh DESCRIPTION
.Nm fdformat
formats a floppy disk at device
.Ar device_name .
.Ar device_name
should be a character device; it may be given either with a full path
name of a raw device node for a floppy disk drive
.Pq e.g., Pa /dev/rfd0c ,
or default name in an abbreviated form,
.Pq e.g., Em fd0 .
Note that any geometry constraints of the device node
.Pq minor device number
are meaningless, since they're overridden by
.Nm fdformat .
.Pp
The options are as follows:
.Pp
.Bl -tag -width Ds -compact
.It Fl n
Don't verify floppy after formatting.
.Pp
.It Fl q
Suppress any normal output from the command, and don't ask the
user for confirmation whether to format the floppy disk at
.Ar device_name .
.Pp
.It Fl v
Don't format; verify only.
.Pp
.It Fl c Ar cyls
.It Fl F Ar fillbyte
.It Fl g Ar gap3len
.It Fl h Ar heads
.It Fl i Ar intleave
.It Fl r Ar rate
.It Fl S Ar secshft
.It Fl s Ar secs
.It Fl t Ar steps_per_track
An alternate method to specify the geometry data to write to the floppy disk.
.El
.Pp
If the
.Fl q
flag has not been specified, the user is asked for confirmation
of the intended formatting process.
In order to continue, an answer of
.Dq y
must be given.
.Sh DIAGNOSTICS
Unless
.Fl q
has been specified, a single letter is printed to standard output
to inform the user about the progress of work.
First, an
.Dq F
is printed when the track(s) is being formatted, then a
.Dq V
while it's being verified, and if an error has been detected, it
will finally change to
.Dq E .
.Pp
An exit status of 0 is returned upon successful operation.
Exit status
1 is returned on any errors during floppy formatting, and an exit status
of 2 reflects invalid arguments given to the program (along with
appropriate information written to diagnostic output).
.Sh SEE ALSO
.Xr fdc 4
.Sh HISTORY
.Nm fdformat
was developed for 386BSD 0.1 and upgraded to the new
.Xr fdc 4
floppy disk driver.
It later became part of
.Fx 1.1 ,
and was then ported to
.Ox 1.2 .
.Sh AUTHORS
The program was contributed by Joerg Wunsch, Dresden,
with changes by Serge Vakulenko and Andrew A. Chernov, Moscow.