1.\" $OpenBSD: fdformat.1,v 1.18 2007/05/31 19:20:23 jmc Exp $ 2.\" 3.\" Copyright (C) 1993, 1994 by Joerg Wunsch, Dresden 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS 16.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, 19.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 23.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25.\" POSSIBILITY OF SUCH DAMAGE. 26.\" 27.Dd $Mdocdate: May 31 2007 $ 28.Dt FDFORMAT 1 29.Os 30.Sh NAME 31.Nm fdformat 32.Nd format floppy disks 33.Sh SYNOPSIS 34.Nm fdformat 35.Bk -words 36.Op Fl nqv 37.Op Fl c Ar cyls 38.Op Fl F Ar fillbyte 39.Op Fl g Ar gap3len 40.Op Fl h Ar heads 41.Op Fl i Ar intleave 42.Op Fl r Ar rate 43.Op Fl S Ar secshft 44.Op Fl s Ar secs 45.Op Fl t Ar steps_per_track 46.Ar device_name 47.Ek 48.Sh DESCRIPTION 49.Nm fdformat 50formats a floppy disk at device 51.Ar device_name . 52.Ar device_name 53should be a character device; it may be given either with a full path 54name of a raw device node for a floppy disk drive 55.Pq e.g., Pa /dev/rfd0c , 56or default name in an abbreviated form, 57.Pq e.g., Em fd0 . 58Note that any geometry constraints of the device node 59.Pq minor device number 60are meaningless, since they're overridden by 61.Nm fdformat . 62.Pp 63The options are as follows: 64.Pp 65.Bl -tag -width Ds -compact 66.It Fl n 67Don't verify floppy after formatting. 68.Pp 69.It Fl q 70Suppress any normal output from the command, and don't ask the 71user for confirmation whether to format the floppy disk at 72.Ar device_name . 73.Pp 74.It Fl v 75Don't format; verify only. 76.Pp 77.It Fl c Ar cyls 78.It Fl F Ar fillbyte 79.It Fl g Ar gap3len 80.It Fl h Ar heads 81.It Fl i Ar intleave 82.It Fl r Ar rate 83.It Fl S Ar secshft 84.It Fl s Ar secs 85.It Fl t Ar steps_per_track 86An alternate method to specify the geometry data to write to the floppy disk. 87.El 88.Pp 89If the 90.Fl q 91flag has not been specified, the user is asked for confirmation 92of the intended formatting process. 93In order to continue, an answer of 94.Dq y 95must be given. 96.Sh DIAGNOSTICS 97Unless 98.Fl q 99has been specified, a single letter is printed to standard output 100to inform the user about the progress of work. 101First, an 102.Dq F 103is printed when the track(s) is being formatted, then a 104.Dq V 105while it's being verified, and if an error has been detected, it 106will finally change to 107.Dq E . 108.Pp 109An exit status of 0 is returned upon successful operation. 110Exit status 1111 is returned on any errors during floppy formatting, and an exit status 112of 2 reflects invalid arguments given to the program (along with 113appropriate information written to diagnostic output). 114.Sh SEE ALSO 115.Xr fdc 4 116.Sh HISTORY 117.Nm fdformat 118was developed for 386BSD 0.1 and upgraded to the new 119.Xr fdc 4 120floppy disk driver. 121It later became part of 122.Fx 1.1 , 123and was then ported to 124.Ox 1.2 . 125.Sh AUTHORS 126The program was contributed by Joerg Wunsch, Dresden, 127with changes by Serge Vakulenko and Andrew A. Chernov, Moscow. 128