1.\" $OpenBSD: fdformat.1,v 1.12 2001/08/02 18:37:34 mpech 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 September 16, 1993 28.Dt FDFORMAT 1 29.Os 30.Sh NAME 31.Nm fdformat 32.Nd format floppy disks 33.Sh SYNOPSIS 34.Nm fdformat 35.Bq Fl q 36.Bq Fl v 37.Bq Fl n 38.Bq Fl c Ar cyls 39.Bq Fl s Ar secs 40.Bq Fl h Ar heads 41.Bq Fl r Ar rate 42.Bq Fl g Ar gap3len 43.Bq Fl i Ar intleave 44.Bq Fl S Ar secshft 45.Bq Fl F Ar fillbyte 46.Bq Fl t Ar steps_per_track 47.Ar device_name 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.Bl -tag -width Ds 65.It Fl q 66Suppress any normal output from the command, and don't ask the 67user for a confirmation whether to format the floppy disk at 68.Ar device_name . 69.It Fl n 70Don't verify floppy after formatting. 71.It Fl v 72Don't format, verify only. 73.It Fl c Ar cyls 74.It Fl s Ar secs 75.It Fl h Ar heads 76.It Fl r Ar rate 77.It Fl g Ar gap3len 78.It Fl i Ar intleave 79.It Fl S Ar secshft 80.It Fl F Ar fillbyte 81.It Fl t Ar steps_per_track 82An alternate method to specify the geometry data to write to the floppy disk. 83.El 84 85If the 86.Fl q 87flag has not been specified, the user is asked for a confirmation 88of the intended formatting process. 89In order to continue, an answer of 90.Dq y 91must be given. 92.Sh DIAGNOSTICS 93Unless 94.Fl q 95has been specified, a single letter is printed to standard output 96to inform the user about the progress of work. 97First, an 98.Dq F 99is printed when the track(s) is being formatted, then a 100.Dq V 101while it's being verified, and if an error has been detected, it 102will finally change to 103.Dq E . 104.Pp 105An exit status of 0 is returned upon successful operation. 106Exit status 1071 is returned on any errors during floppy formatting, and an exit status 108of 2 reflects invalid arguments given to the program (along with 109appropriate information written to diagnostic output). 110.Sh SEE ALSO 111.Xr fdc 4 112.Sh HISTORY 113.Nm fdformat 114was developed for 386BSD 0.1 and upgraded to the new 115.Xr fd 4 116floppy disk driver. 117It later became part of 118.Fx 1.1 , 119and was then ported to 120.Ox 1.2 . 121.Sh AUTHORS 122The program was been contributed by Joerg Wunsch, Dresden, 123with changes by Serge Vakulenko and Andrew A. Chernov, Moscow. 124