p Bits q 0-3 of the minor device number of the special files referring to this device encode the floppy density as follows: l -tag -width indent -offset indent t 0 3.5'' 1.44MB floppy diskettes. t 1 3.5'' 720KB floppy diskettes. t 2 3.5'' 360KB floppy diskettes. t 3 3.5'' 1.2MB/NEC Japanese format floppy diskettes. .El .Sh FORMATTING The driver supports floppy disk formatting using the interfaces in n sys/fdio.h :
p l -tag -width FDIOCFORMAT_TRACK -compact t Dv FDIOCGETFORMAT Fa struct fdformat_parms Fetch current formatting parameters. This gets the default parameters for the open device if no parameters have been set during the session.
p t Dv FDIOCSETFORMAT Fa struct fdformat_parms Set formatting parameters. The driver saves this state and it persists while the device is open.
p t Dv FDIOCFORMAT_TRACK Fa struct fdformat_cmd Format a track on the medium. If this call returns .Er EINVAL , the track formatting parameters were out of range for the medium. If it returns .Er EIO , there was a medium error while formatting the track.
p t Dv FDIOCSETOPTS Fa int Set driver options which persist until the device is closed. The options should be the logical OR of the desired values below:
p l -tag -width FDOPT_NORETRY -compact t Dv FDOPT_NORETRY Do not retry operations on failure t Dv FDOPT_SILENT Do not print error messages to the console .El
p t Dv FDIOCGETOPTS Fa int Fetch drive options. .El
p A typical use of the formatting facilities would be to open the device, call .Dv FDIOCGETFORMAT to fetch the current format parameters, perhaps change a parameter or two, display the formatting details to the user, and then call .Dv FDIOCSETFORMAT followed by a series of calls to .Dv FDIOCFORMAT_TRACK . .Sh SEE ALSO .Xr eject 1 , .Xr fdformat 1 .Sh HISTORY The .Nm formatting support appeared in .Nx 1.3 . .Sh BUGS Formatting appears to not work reliably on all machines.