FD(4) Linux Programmer’s Manual FD(4)
名前
fd - フロッピーディスク(floppy disk)デバイス
設定
フロッピードライブはメジャーナンバー 2 を持つブロックデバイスである。一
般的には、このデバイスのオーナーは root.floppy (オーナー root、グループ
floppy) で、モード 0660 (グループの構成員であることによってアクセスチェ
ックが行われる)、または、モード 0666 (誰でもアクセスできる) である。 マ
イ ナーナンバーはデバイスのタイプ、ドライブの番号、コントローラーの番号
を符号化したものである。それぞれのデバイスタイプ (これは、 密 度 (den-
sity) とトラックカウント (track count) の組合せである) は、ベースとなる
マイナーナンバーを持っている。このベースナンバーにそのコントローラー 上
のドライブナンバーを加える。もし、そのドライブが 2 番目のコントローラー
に接続されているなら、さらに 128 を加える。次のデバイステーブルでは、 n
はドライブ番号を表す。
警 告: もし、ドライブでサポートされているより多くのトラックを持つように
フォーマットしようとした場合、機械的なダメージを引き起こすかも知れな い
。
翻 訳者注: 以下の表に用いられる用語は表の整形の関係から (一行にうまく納
める事ができなかったため) から原文のままとなっています。日本語との対 応
は以下の通りです。
Name 名前
Capac. 容量
Cyl. シリンダ数
Sect. セクタ数
Heads. ヘッダ数
Base minor # ベースマイナーナンバー
メ ディアのフォーマットと容量を自動的に検出するドライブ非依存のデバイス
ファイル:
Name Base minor #
--------------------
fdn 0
5.25 インチ倍密度(double density)デバイスファイル:
Name Capac. Cyl. Sect. Heads Base minor #
----------------------------------------------------------
fdnd360 360K 40 9 2 4
5.25 インチ高密度(high density)デバイスファイル:
Name Capac. Cyl. Sect. Heads Base minor #
----------------------------------------------------------
fdnh360 360K 40 9 2 20
fdnh410 410K 41 10 2 48
fdnh420 420K 42 10 2 64
fdnh720 720K 80 9 2 24
fdnh880 880K 80 11 2 80
fdnh1200 1200K 80 15 2 8
fdnh1440 1440K 80 18 2 40
fdnh1476 1476K 82 18 2 56
fdnh1494 1494K 83 18 2 72
fdnh1600 1600K 80 20 2 92
3.5 インチ倍密度(double density)デバイスファイル:
Name Capac. Cyl. Sect. Heads Base minor #
----------------------------------------------------------
fdnD360 360K 80 9 1 12
fdnD720 720K 80 9 2 16
fdnD800 800K 80 10 2 120
fdnD1040 1040K 80 13 2 84
fdnD1120 1120K 80 14 2 88
3.5 インチ高密度(high density)デバイスファイル:
Name Capac. Cyl. Sect. Heads Base minor #
----------------------------------------------------------
fdnH360 360K 40 9 2 12
fdnH720 720K 80 9 2 16
fdnH820 820K 82 10 2 52
fdnH830 830K 83 10 2 68
fdnH1440 1440K 80 18 2 28
fdnH1600 1600K 80 20 2 124
fdnH1680 1680K 80 21 2 44
fdnH1722 1722K 82 21 2 60
fdnH1743 1743K 83 21 2 76
fdnH1760 1760K 80 22 2 96
fdnH1840 1840K 80 23 2 116
fdnH1920 1920K 80 24 2 100
3.5 インチ拡張密度(extra density)デバイスファイル:
Name Capac. Cyl. Sect. Heads Base minor #
----------------------------------------------------------
fdnE2880 2880K 80 36 2 32
fdnCompaQ 2880K 80 36 2 36
fdnE3200 3200K 80 40 2 104
fdnE3520 3520K 80 44 2 108
fdnE3840 3840K 80 48 2 112
説明
fd スペシャルファイルはフロッピーディスクドライブにロ ー モ ー ド (raw
mode) でアクセスする。fd では、次の ioctl(2) コールがサポートされている
。
FDCLRPRM
ドライブのメディア情報(ドライブ内のディスクのジオメトリ情報)をク
リアする。
FDSETPRM
ドライブのメディア情報をセットする。メディア情報はメディアが交換
された時、失われる。
FDDEFPRM
ドライブのメディア情報(ドライブ内のディスクのジオメトリ情報)をセ
ットする。メディア情報はメディアが交換された時でも失われない。こ
れは(メディア情報の)自動検出を無効にする。自動検出を再び有効にす
るために、 FDCLRPRM を発行しなければならない。
FDGETDRVTYP
ドライブのタイプ(名前引数)を返す。それぞれのドライブタイプに適合
するようにフォーマットを行うため、FDGETDRVTYP はフォーマットをサ
ポートする最も古いドライブタイプのために適切な名前を返す。
FDFLUSH
与えられたドライブのバッファキャッシュを無効にする。
FDSETMAXERRS
エラーの報告、操作の中止、再試行、リセット、セクター毎の読み込み
のためのエラー閾値をセットする。
FDGETMAXERRS
現在のエラー閾値を得る。
FDGETDRVTYP
ドライブの内部名を得る。
FDWERRORCLR
書き込みエラーの統計をクリアーする。
FDWERRORGET
書き込みエラーの統計を読む。統計は、書き込みエラーの合計、最初の
書き込みエラーはどのディスクのどこで起こったか、そして、最後の書
き込みエラーがどのディスクのどこで起こったかという情報を含んでい
る。ディスクはディスクの交換ごとに増えるジェネレーション番号によ
って識別される。
FDTWADDLE
数ミリ秒の間ドライブのモーターのスイッチを切る。これはディスクの
セクター同士が接近しすぎているディスクのアクセスのために必要であ
ろう。
FDSETDRVPRM
ドライブの様々なパラメータをセットする。
FDGETDRVPRM
(FDSETDRVPRM を使ってセットした)パラメータを読みだす。
FDGETDRVSTAT
キャッシュされているドライブの状態(ディスクの交換、ライトプロ テ
クトなど)を得る。
FDPOLLDRVSTAT
ドライブをポーリングして、その状態を返す。
FDGETFDCSTAT
フロッピーコントローラーの状態を得る。
FDRESET
フロッピーコントローラーを信頼できる状態にリセットする。
FDRAWCMD
フ ロッピーコントローラーに低レベルのコマンド(raw command)を送る
。
より正確な情報のためには、フロッピーコントローラーのマニュアルはもち ろ
ん、
FD(4) Linux Programmer’s Manual FD(4)
NAME
fd - floppy disk device
CONFIGURATION
Floppy drives are block devices with major number 2. Typically they
are owned by root.floppy (i.e., user root, group floppy) and have
either mode 0660 (access checking via group membership) or mode 0666
(everybody has access). The minor numbers encode the device type,
drive number, and controller number. For each device type (that is,
combination of density and track count) there is a base minor number.
To this base number, add the drive’s number on its controller and 128
if the drive is on the secondary controller. In the following device
tables, n represents the drive number.
Warning: If you use formats with more tracks than supported by your
drive, you may cause it mechanical damage. Trying once if more tracks
than the usual 40/80 are supported should not damage it, but no war-
ranty is given for that. Don’t create device entries for those formats
to prevent their usage if you are not sure.
Drive independent device files which automatically detect the media
format and capacity:
Name Base minor #
--------------------
fdn 0
5.25 inch double density device files:
Name Capac. Cyl. Sect. Heads Base minor #
----------------------------------------------------------
fdnd360 360K 40 9 2 4
5.25 inch high density device files:
Name Capac. Cyl. Sect. Heads Base minor #
----------------------------------------------------------
fdnh360 360K 40 9 2 20
fdnh410 410K 41 10 2 48
fdnh420 420K 42 10 2 64
fdnh720 720K 80 9 2 24
fdnh880 880K 80 11 2 80
fdnh1200 1200K 80 15 2 8
fdnh1440 1440K 80 18 2 40
fdnh1476 1476K 82 18 2 56
fdnh1494 1494K 83 18 2 72
fdnh1600 1600K 80 20 2 92
3.5 inch double density device files:
Name Capac. Cyl. Sect. Heads Base minor #
----------------------------------------------------------
fdnD360 360K 80 9 1 12
fdnD720 720K 80 9 2 16
fdnD800 800K 80 10 2 120
fdnD1040 1040K 80 13 2 84
fdnD1120 1120K 80 14 2 88
3.5 inch high density device files:
Name Capac. Cyl. Sect. Heads Base minor #
----------------------------------------------------------
fdnH360 360K 40 9 2 12
fdnH720 720K 80 9 2 16
fdnH820 820K 82 10 2 52
fdnH830 830K 83 10 2 68
fdnH1440 1440K 80 18 2 28
fdnH1600 1600K 80 20 2 124
fdnH1680 1680K 80 21 2 44
fdnH1722 1722K 82 21 2 60
fdnH1743 1743K 83 21 2 76
fdnH1760 1760K 80 22 2 96
fdnH1840 1840K 80 23 2 116
fdnH1920 1920K 80 24 2 100
3.5 inch extra density device files:
Name Capac. Cyl. Sect. Heads Base minor #
----------------------------------------------------------
fdnE2880 2880K 80 36 2 32
fdnCompaQ 2880K 80 36 2 36
fdnE3200 3200K 80 40 2 104
fdnE3520 3520K 80 44 2 108
fdnE3840 3840K 80 48 2 112
DESCRIPTION
fd special files access the floppy disk drives in raw mode. The fol-
lowing ioctl(2) calls are supported by fd devices:
FDCLRPRM
clears the media information of a drive (geometry of disk in
drive).
FDSETPRM
sets the media information of a drive. The media information
will be lost when the media is changed.
FDDEFPRM
sets the media information of a drive (geometry of disk in
drive). The media information will not be lost when the media
is changed. This will disable autodetection. In order to re-
enable autodetection, you have to issue an FDCLRPRM.
FDGETDRVTYP
returns the type of a drive (name parameter). For formats which
work in several drive types, FDGETDRVTYP returns a name which is
appropriate for the oldest drive type which supports this for-
mat.
FDFLUSH
invalidates the buffer cache for the given drive.
FDSETMAXERRS
sets the error thresholds for reporting errors, aborting the
operation, recalibrating, resetting, and reading sector by sec-
tor.
FDSETMAXERRS
gets the current error thresholds.
FDGETDRVTYP
gets the internal name of the drive.
FDWERRORCLR
clears the write error statistics.
FDWERRORGET
reads the write error statistics. These include the total num-
ber of write errors, the location and disk of the first write
error, and the location and disk of the last write error. Disks
are identified by a generation number which is incremented at
(almost) each disk change.
FDTWADDLE
Switch the drive motor off for a few microseconds. This might
be needed in order to access a disk whose sectors are too close
together.
FDSETDRVPRM
sets various drive parameters.
FDGETDRVPRM
reads these parameters back.
FDGETDRVSTAT
gets the cached drive state (disk changed, write protected et
al.)
FDPOLLDRVSTAT
polls the drive and return its state.
FDGETFDCSTAT
gets the floppy controller state.
FDRESET
resets the floppy controller under certain conditions.
FDRAWCMD
sends a raw command to the floppy controller.
For more precise information, consult also the
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa