diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2002-01-10 17:41:22 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2002-01-10 17:41:22 +0000 |
commit | befa1166424c77533f9fcbef303afd58c06c9d52 (patch) | |
tree | 8021d2059781ac8492cb2291878cba9c2da23205 /usr.sbin/fdcontrol | |
parent | ba625eb241ce68dbad84b679d4e8d3ffb702cd7d (diff) | |
download | src-befa1166424c77533f9fcbef303afd58c06c9d52.tar.gz src-befa1166424c77533f9fcbef303afd58c06c9d52.zip |
Notes
Diffstat (limited to 'usr.sbin/fdcontrol')
-rw-r--r-- | usr.sbin/fdcontrol/fdcontrol.8 | 129 |
1 files changed, 79 insertions, 50 deletions
diff --git a/usr.sbin/fdcontrol/fdcontrol.8 b/usr.sbin/fdcontrol/fdcontrol.8 index 8e45c01500be..e01355464789 100644 --- a/usr.sbin/fdcontrol/fdcontrol.8 +++ b/usr.sbin/fdcontrol/fdcontrol.8 @@ -51,30 +51,31 @@ driver for the device specified by Commands are implemented to query the current device density settings as well as the underlying device hardware as registered with the driver, to manipulate debugging levels, and to adjust the device -density settings. All the operations that manipulate the kernel +density settings. +All the operations that manipulate the kernel settings are restricted to the superuser (by the device driver), while all inquiry requests only require read access to .Ar device . .Pp The .Ar device -argument should always be given as a full path name, e. g. +argument should always be given as a full path name, e.g.\& .Pa /dev/fd0 . -.Pp -.Ss Inquiry commands +.Ss Inquiry Commands Running the .Nm utility without any of the optional flags will report the drive type that has been registered with the device driver. In the shortest form, a single string describing the drive type will -be returned. Possible values are: -.Ql 360K , -.Ql 1.2M , -.Ql 720K , -.Ql 1.44M , -.Ql 2.88M , +be returned. +Possible values are: +.Dq Li 360K , +.Dq Li 1.2M , +.Dq Li 720K , +.Dq Li 1.44M , +.Dq Li 2.88M , or -.Ql unknown . +.Dq Li unknown . This information is primarily intented to be easily parsable by scripts. .Pp @@ -88,26 +89,28 @@ Specifying flag will report the device's density settings in a form that is suitable as input to the .Fl s Ar fmtstr -option (see below). Again, together with +option (see below). +Again, together with .Fl v , some more text will be returned, including the total capacity of the density settings in kilobytes. -.Ss Debug control +.Ss Debug Control If the .Xr fdc 4 driver has been configured with the -.Ql FDC_DEBUG +.Dv FDC_DEBUG option, by default, device debugging information is still disabled -since it could produce huge amounts of kernel messages. It needs to +since it could produce huge amounts of kernel messages. +It needs to be turned on using .Nm together with -.Fl d Ar 1 , +.Dq Fl d Li 1 , usually immediately before starting an operation on the respective device the debug information is wanted for, and later turned off again using -.Fl d Ar 0 . -Note that the debugging levels are a driver global option that will +.Dq Fl d Li 0 . +Note that debugging levels are a driver's global option that will affect any drives and controllers using the .Xr fdc 4 driver, regardless which @@ -115,19 +118,24 @@ driver, regardless which has been specified on the .Nm command line. -.Ss Density control +.Ss Density Control The .Xr fdc 4 control utilities support two different options how to specify device -density settings. The first form uses +density settings. +The first form uses .Fl f Ar fmt -to specify the format of the medium in kilobytes. Depending on the +to specify the format of the medium in kilobytes. +Depending on the underlying drive type, the value is compared against a table of known commonly used device density settings for that drive, and if a match -has been found, those settings will be used. Currently, the following +has been found, those settings will be used. +Currently, the following values for the respective drive types are acceptable: -.Bl -tag -width 2.88M -offset 4 -.It 2.88M and 1.44M drives: +.Bl -item +.It +2.88M and 1.44M drives: +.Bd -ragged -offset indent -compact .TS lB lB lB lB lB lB lB r l l l l l l. @@ -140,7 +148,10 @@ KB sectrac secsize ncyls speed heads flags 800 10 2 (512) 80 250 2 MFM 720 9 2 (512) 80 250 2 MFM .TE -.It 1.2M drives: +.Ed +.It +1.2M drives: +.Bd -ragged -offset indent -compact .TS lB lB lB lB lB lB lB r l l l l l l. @@ -156,32 +167,43 @@ KB sectrac secsize ncyls speed heads flags 360 9 2 (512) 40 300 2 MFM,2STEP 640 8 2 (512) 80 300 2 MFM .TE -.It 720K drives: +.Ed +.It +720K drives: +.Bd -ragged -offset indent -compact .TS lB lB lB lB lB lB lB r l l l l l l. KB sectrac secsize ncyls speed heads flags 720 9 2 (512) 80 250 2 MFM .TE -.It 360K drives: +.Ed +.It +360K drives: +.Bd -ragged -offset indent -compact .TS lB lB lB lB lB lB lB r l l l l l l. KB sectrac secsize ncyls speed heads flags 360 9 2 (512) 40 250 2 MFM .TE +.Ed .El .Pp The second form to specify a device density uses .Fl s Ar fmtstr -to explicitly specify each parameter in detail. The argument +to explicitly specify each parameter in detail. +The argument .Ar fmtstr is a comma-separated list of values of the form: .Pp -.Em sectrac,secsize,datalen,gap,ncyls,speed,heads,f_gap,f_inter,offs2,flags +.Sm off +.Ar sectrac , secsize , datalen , gap , ncyls , speed , +.Ar heads , f_gap , f_inter , offs2 , flags +.Sm on .Pp The meaning of the parameters is: -.Bl -tag -width secsize -offset indent +.Bl -tag -width ".Ar secsize" .It Ar sectrac The number of sectors per track. .It Ar secsize @@ -195,43 +217,47 @@ The length of the gap 3 parameter for read/write operations. .It Ar ncyls The number of cylinders. .It Ar speed -The transfer speed in kilobytes per second. Can be 250, 300, 500, or +The transfer speed in kilobytes per second. +Can be 250, 300, 500, or 1000, but each drive type only supports a subset of these values. .It Ar heads The number of heads. .It Ar f_gap The length of the gap 3 when formatting media. .It Ar f_inter -The sector interleave to be applied when formatting. 0 means no +The sector interleave to be applied when formatting. +0 means no interleave, 1 means 1:1 etc. .It Ar offs2 -The offset of the sector numbers on side 2 (i. e. head number 1). +The offset of the sector numbers on side 2 (i.e. head number 1). Normally, sector numbering on both sides starts with 1. .It Ar flags A list from one of the following flag values: -.Bl -tag -compact -width "+perpend" -.It Ar +mfm +.Pp +.Bl -tag -width ".Cm +perpend" -compact +.It Cm +mfm Use MFM encoding. -.It Ar -mfm +.It Cm -mfm Use FM (single-density) encoding. -.It Ar +2step +.It Cm +2step Use 2 steps per each cylinder (for accessing 40-cylinder media in 80-cylinder drives). -.It Ar -2step -Do not use 2 steps per cylinder, i. e. access each physical cylinder +.It Cm -2step +Do not use 2 steps per cylinder, i.e. access each physical cylinder of the drive. -.It Ar +perpend +.It Cm +perpend Use perpendicular recording (for 2.88 MB media, currently not supported). -.It Ar -perpend +.It Cm -perpend Use longitudinal recording. .El .El .Pp For any missing parameter, the current value will be used, so only -actual changes need to be specified. Thus to turn off a flag bit +actual changes need to be specified. +Thus to turn off a flag bit (like -.Ql +mfm +.Cm +mfm which is the default for all drive types), the form with a leading minus sign must explicitly be used. .Sh EXAMPLES @@ -241,11 +267,12 @@ $ fdcontrol /dev/fd0 1.44M .Ed .Pp -Same as above, but with verbose output. Note that the result is about +Same as above, but with verbose output. +Note that the result is about the -.Em drive type , +.Em "drive type" , as opposed to a -.Em device density , +.Em "device density" , so it is independent from the actual subdevice being used for .Ar device . .Bd -literal @@ -266,10 +293,11 @@ explained in .Xr fdc 4 . Thus, albeit the device name in the example above suggests a 720 KB media density, it has actually been initialized (by the driver) to -1440 KB. So in order to adjust it for standard 720 KB double-density +1440 KB. +So, in order to adjust it for standard 720 KB double-density media, one of the following .Nm -command needs to be run: +commands needs to be run: .Bd -literal # fdcontrol -s 9,,,0x20,,250,,0x50 /dev/fd0.720 # fdcontrol -f 720 /dev/fd0.720 @@ -277,9 +305,10 @@ command needs to be run: .Pp As indicated, trailing commas in the parameter list may be omitted. .Pp -In order to access archaic 160 KB single-density (FM encoded) 5.25\" +In order to access archaic 160 KB single-density (FM encoded) 5.25 media in a modern 1.2M drive, something like the following definition -would be needed. (Note that not all controller hardware is actually +would be needed. +(Note that not all controller hardware is actually capable of handling FM encoding at all.) .Bd -literal # fdcontrol -s 16,128,0x80,0x2,40,300,,0x10,,,-mfm,+2step /dev/fd1.1 |