diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2018-09-17 15:44:17 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2018-09-17 15:44:17 +0000 |
commit | 45834454b80b8bd6d8b35694104b0248a01ba616 (patch) | |
tree | 614963f3795976d4f16705830f273c3142d2ccf3 /usr.sbin/fdformat | |
parent | 4d216fb8ddaea066d730b1daa25f7c7dbaabb232 (diff) |
clean up the amount of printf in usage(): from sascha paunovic
move the descriptive text in usage() to the man page: from robert klein
Diffstat (limited to 'usr.sbin/fdformat')
-rw-r--r-- | usr.sbin/fdformat/fdformat.1 | 44 | ||||
-rw-r--r-- | usr.sbin/fdformat/fdformat.c | 26 |
2 files changed, 34 insertions, 36 deletions
diff --git a/usr.sbin/fdformat/fdformat.1 b/usr.sbin/fdformat/fdformat.1 index 35220ac6c21..bfe31df247e 100644 --- a/usr.sbin/fdformat/fdformat.1 +++ b/usr.sbin/fdformat/fdformat.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fdformat.1,v 1.20 2018/06/07 11:37:21 jmc Exp $ +.\" $OpenBSD: fdformat.1,v 1.21 2018/09/17 15:44:16 jmc Exp $ .\" .\" Copyright (C) 1993, 1994 by Joerg Wunsch, Dresden .\" All rights reserved. @@ -24,7 +24,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 7 2018 $ +.Dd $Mdocdate: September 17 2018 $ .Dt FDFORMAT 1 .Os .Sh NAME @@ -61,29 +61,43 @@ are meaningless, since they're overridden by .Nm fdformat . .Pp The options are as follows: -.Pp -.Bl -tag -width Ds -compact +.Bl -tag -width Ds +.It Fl c Ar cyls +Number of cylinders +.Pq 40 or 80 . +.It Fl F Ar fillbyte +Use +.Ar fillbyte +as fill byte. +.It Fl g Ar gap3len +Length of gap at the end of any sector +.Pq Dq gap 3 . +.It Fl h Ar heads +Number of floppy heads +.Pq 1 or 2 . +.It Fl i Ar intleave +Sector interleave to be used. .It Fl n Don't verify floppy after formatting. -.Pp .It Fl q Suppress any normal output from the command, and don't ask the user for confirmation whether to format the floppy disk at .Ar device_name . -.Pp -.It Fl v -Don't format; verify only. -.Pp -.It Fl c Ar cyls -.It Fl F Ar fillbyte -.It Fl g Ar gap3len -.It Fl h Ar heads -.It Fl i Ar intleave .It Fl r Ar rate +Data transfer rate in kilobyte/sec +.Pq 250, 300, or 500 . .It Fl S Ar secshft +Sector size code: 0 for 128, 1 for 256, and 2 for 512 byte +sectors. .It Fl s Ar secs +Number of sectors per track +.Pq 9, 10, 15, or 18 . .It Fl t Ar steps_per_track -An alternate method to specify the geometry data to write to the floppy disk. +Number of steps per track. +An alternate method to specify the +geometry data to write to the floppy disk. +.It Fl v +Don't format; verify only. .El .Pp If the diff --git a/usr.sbin/fdformat/fdformat.c b/usr.sbin/fdformat/fdformat.c index c2566992e3a..ebc2f7188a6 100644 --- a/usr.sbin/fdformat/fdformat.c +++ b/usr.sbin/fdformat/fdformat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdformat.c,v 1.22 2016/03/16 15:41:11 krw Exp $ */ +/* $OpenBSD: fdformat.c,v 1.23 2018/09/17 15:44:16 jmc Exp $ */ /* * Copyright (C) 1992-1994 by Joerg Wunsch, Dresden @@ -132,26 +132,10 @@ verify_track(int fd, int track, int tracksize) static void usage(void) { - printf("usage: %s [-nqv] [-c cyls] [-F fillbyte] [-g gap3len] ", - __progname); - printf("[-h heads]\n"); - printf("\t[-i intleave] [-r rate] [-S secshft] [-s secs]\n"); - printf("\t[-t steps_per_track] device_name\n"); - printf("Options:\n"); - printf("\t-n\tdon't verify floppy after formatting\n"); - printf("\t-q\tsuppress any normal output, don't ask for confirmation\n"); - printf("\t-v\tdon't format, verify only\n"); - printf("\tdevname\tthe full name of floppy device or in short form fd0, fd1\n"); - printf("Obscure options:\n"); - printf("\t-c #\tspecify number of cylinders, 40 or 80\n"); - printf("\t-F #\tspecify fill byte\n"); - printf("\t-g #\tspecify gap length\n"); - printf("\t-h #\tspecify number of floppy heads, 1 or 2\n"); - printf("\t-i #\tspecify interleave factor\n"); - printf("\t-r #\tspecify data rate, 250, 300 or 500 kbps\n"); - printf("\t-S #\tspecify sector size, 0=128, 1=256, 2=512 bytes\n"); - printf("\t-s #\tspecify number of sectors per track, 9, 10, 15 or 18\n"); - printf("\t-t #\tnumber of steps per track\n"); + printf("usage: %s [-nqv] [-c cyls] [-F fillbyte] [-g gap3len] " + "[-h heads]\n" + " [-i intleave] [-r rate] [-S secshft] [-s secs]\n" + " [-t steps_per_track] device_name\n", __progname); exit(2); } |