version 1, including all changes.
.
| Rev |
Author |
# |
Line |
| 1 |
perry |
1 |
FD |
| |
|
2 |
!!!FD |
| |
|
3 |
NAME |
| |
|
4 |
CONFIGURATION |
| |
|
5 |
DESCRIPTION |
| |
|
6 |
NOTES |
| |
|
7 |
FILES |
| |
|
8 |
AUTHORS |
| |
|
9 |
SEE ALSO |
| |
|
10 |
---- |
| |
|
11 |
!!NAME |
| |
|
12 |
|
| |
|
13 |
|
| |
|
14 |
fd - floppy disk device |
| |
|
15 |
!!CONFIGURATION |
| |
|
16 |
|
| |
|
17 |
|
| |
|
18 |
Floppy drives are block devices with major number 2. |
| |
|
19 |
Typically they are owned by root.floppy and have either mode |
| |
|
20 |
0660 (access checking via group membership) or mode 0666 |
| |
|
21 |
(everybody has access). For the following devices, ''n'' |
| |
|
22 |
is the drive number. It is 0 for the first drive, 1 for the |
| |
|
23 |
second etc. To get a minor number for a specific drive |
| |
|
24 |
connected to the first controller, add ''n'' to the minor |
| |
|
25 |
base number. If it is connected to the second controller, |
| |
|
26 |
add ''n''+128 to the minor base number. __Warning: If |
| |
|
27 |
you use formats with more tracks than supported by your |
| |
|
28 |
drive, you may damage it mechanically.__ Trying once if |
| |
|
29 |
more tracks than the usual 40/80 are supported should not |
| |
|
30 |
damage it, but no warranty is given for that. Don't create |
| |
|
31 |
device entries for those formats to prevent their usage if |
| |
|
32 |
you are not sure. |
| |
|
33 |
|
| |
|
34 |
|
| |
|
35 |
Drive independent device files which automatically detect |
| |
|
36 |
the media format and capacity: |
| |
|
37 |
|
| |
|
38 |
|
| |
|
39 |
5.25 inch double density device files: |
| |
|
40 |
|
| |
|
41 |
|
| |
|
42 |
5.25 inch high density device files: |
| |
|
43 |
|
| |
|
44 |
|
| |
|
45 |
3.5 inch double density device files: |
| |
|
46 |
|
| |
|
47 |
|
| |
|
48 |
3.5 inch high density device files: |
| |
|
49 |
|
| |
|
50 |
|
| |
|
51 |
3.5 inch extra density device files: |
| |
|
52 |
!!DESCRIPTION |
| |
|
53 |
|
| |
|
54 |
|
| |
|
55 |
__fd__ special files access the floppy disk drives in raw mode. The following ioctl(2) calls are supported by __fd__ devices: |
| |
|
56 |
|
| |
|
57 |
|
| |
|
58 |
__FDCLRPRM__ |
| |
|
59 |
|
| |
|
60 |
|
| |
|
61 |
clears the media information of a drive (geometry of disk in |
| |
|
62 |
drive). |
| |
|
63 |
|
| |
|
64 |
|
| |
|
65 |
__FDSETPRM__ |
| |
|
66 |
|
| |
|
67 |
|
| |
|
68 |
sets the media information of a drive. The media information |
| |
|
69 |
will be lost when the media is changed. |
| |
|
70 |
|
| |
|
71 |
|
| |
|
72 |
__FDDEFPRM__ |
| |
|
73 |
|
| |
|
74 |
|
| |
|
75 |
sets the media information of a drive (geometry of disk in |
| |
|
76 |
drive). The media information will not be lost when the |
| |
|
77 |
media is changed. This will disable autodetection. In order |
| |
|
78 |
to re-enable autodetection, you have to issue an |
| |
|
79 |
__FDCLRPRM__ . |
| |
|
80 |
|
| |
|
81 |
|
| |
|
82 |
__FDGETDRVTYP__ |
| |
|
83 |
|
| |
|
84 |
|
| |
|
85 |
returns the type of a drive (name parameter). For formats |
| |
|
86 |
which work in several drive types, __FDGETDRVTYP__ |
| |
|
87 |
returns a name which is appropriate for the oldest drive |
| |
|
88 |
type which supports this format. |
| |
|
89 |
|
| |
|
90 |
|
| |
|
91 |
__FDFLUSH__ |
| |
|
92 |
|
| |
|
93 |
|
| |
|
94 |
invalidates the buffer cache for the given |
| |
|
95 |
drive. |
| |
|
96 |
|
| |
|
97 |
|
| |
|
98 |
__FDSETMAXERRS__ |
| |
|
99 |
|
| |
|
100 |
|
| |
|
101 |
sets the error thresholds for reporting errors, aborting the |
| |
|
102 |
operation, recalibrating, resetting, and reading sector by |
| |
|
103 |
sector. |
| |
|
104 |
|
| |
|
105 |
|
| |
|
106 |
__FDSETMAXERRS__ |
| |
|
107 |
|
| |
|
108 |
|
| |
|
109 |
gets the current error thresholds. |
| |
|
110 |
|
| |
|
111 |
|
| |
|
112 |
__FDGETDRVTYP__ |
| |
|
113 |
|
| |
|
114 |
|
| |
|
115 |
gets the internal name of the drive. |
| |
|
116 |
|
| |
|
117 |
|
| |
|
118 |
__FDWERRORCLR__ |
| |
|
119 |
|
| |
|
120 |
|
| |
|
121 |
clears the write error statistics. |
| |
|
122 |
|
| |
|
123 |
|
| |
|
124 |
__FDWERRORGET__ |
| |
|
125 |
|
| |
|
126 |
|
| |
|
127 |
reads the write error statistics. These include the total |
| |
|
128 |
number of write errors, the location and disk of the first |
| |
|
129 |
write error, and the location and disk of the last write |
| |
|
130 |
error. Disks are identified by a generation number which is |
| |
|
131 |
incremented at (almost) each disk change. |
| |
|
132 |
|
| |
|
133 |
|
| |
|
134 |
__FDTWADDLE__ |
| |
|
135 |
|
| |
|
136 |
|
| |
|
137 |
Switch the drive motor off for a few microseconds. This |
| |
|
138 |
might be needed in order to access a disk whose sectors are |
| |
|
139 |
too close together. |
| |
|
140 |
|
| |
|
141 |
|
| |
|
142 |
__FDSETDRVPRM__ |
| |
|
143 |
|
| |
|
144 |
|
| |
|
145 |
sets various drive parameters. |
| |
|
146 |
|
| |
|
147 |
|
| |
|
148 |
__FDGETDRVPRM__ |
| |
|
149 |
|
| |
|
150 |
|
| |
|
151 |
reads these parameters back. |
| |
|
152 |
|
| |
|
153 |
|
| |
|
154 |
__FDGETDRVSTAT__ |
| |
|
155 |
|
| |
|
156 |
|
| |
|
157 |
gets the cached drive state (disk changed, write protected |
| |
|
158 |
et al.) |
| |
|
159 |
|
| |
|
160 |
|
| |
|
161 |
__FDPOLLDRVSTAT__ |
| |
|
162 |
|
| |
|
163 |
|
| |
|
164 |
polls the drive and return its state. |
| |
|
165 |
|
| |
|
166 |
|
| |
|
167 |
__FDGETFDCSTAT__ |
| |
|
168 |
|
| |
|
169 |
|
| |
|
170 |
gets the floppy controller state. |
| |
|
171 |
|
| |
|
172 |
|
| |
|
173 |
__FDRESET__ |
| |
|
174 |
|
| |
|
175 |
|
| |
|
176 |
resets the floppy controller under certain |
| |
|
177 |
conditions. |
| |
|
178 |
|
| |
|
179 |
|
| |
|
180 |
__FDRAWCMD__ |
| |
|
181 |
|
| |
|
182 |
|
| |
|
183 |
sends a raw command to the floppy controller. |
| |
|
184 |
|
| |
|
185 |
|
| |
|
186 |
For more precise information, consult also the |
| |
|
187 |
!!NOTES |
| |
|
188 |
|
| |
|
189 |
|
| |
|
190 |
The various formats allow to read and write many types of |
| |
|
191 |
disks. However, if a floppy is formatted with a too small |
| |
|
192 |
inter sector gap, performance may drop, up to needing a few |
| |
|
193 |
seconds to access an entire track. To prevent this, use |
| |
|
194 |
interleaved formats. It is not possible to read floppies |
| |
|
195 |
which are formatted using GCR (group code recording), which |
| |
|
196 |
is used by Apple II and Macintosh computers (800k disks). |
| |
|
197 |
Reading floppies which are hard sectored (one hole per |
| |
|
198 |
sector, with the index hole being a little skewed) is not |
| |
|
199 |
supported. This used to be common with older 8 inch |
| |
|
200 |
floppies. |
| |
|
201 |
!!FILES |
| |
|
202 |
|
| |
|
203 |
|
| |
|
204 |
/dev/fd* |
| |
|
205 |
!!AUTHORS |
| |
|
206 |
|
| |
|
207 |
|
| |
|
208 |
Alain Knaff (Alain@linux.lu), David Niemi (niemidc@tux.org), |
| |
|
209 |
Bill Broadhurst (bbroad@netcom.com). |
| |
|
210 |
!!SEE ALSO |
| |
|
211 |
|
| |
|
212 |
|
| |
|
213 |
floppycontrol(1), mknod(1), chown(1), |
| |
|
214 |
getfdprm(1), superformat(1), mount(8), |
| |
|
215 |
setfdprm(1) |
| |
|
216 |
---- |