Module Name:    src
Committed By:   christos
Date:           Sun Feb 19 19:49:20 UTC 2012

Modified Files:
        src/sbin/dump: dump.8 main.c

Log Message:
PR/45735: Bug Hunting: The dump(8) manpage, as well as the program's 
`usage'-line,
needs improvement


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sbin/dump/dump.8
cvs rdiff -u -r1.66 -r1.67 src/sbin/dump/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/dump/dump.8
diff -u src/sbin/dump/dump.8:1.62 src/sbin/dump/dump.8:1.63
--- src/sbin/dump/dump.8:1.62	Fri Nov  5 06:02:53 2010
+++ src/sbin/dump/dump.8	Sun Feb 19 14:49:20 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: dump.8,v 1.62 2010/11/05 10:02:53 hannken Exp $
+.\"	$NetBSD: dump.8,v 1.63 2012/02/19 19:49:20 christos Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	 Regents of the University of California.
@@ -30,7 +30,7 @@
 .\"
 .\"     @(#)dump.8	8.3 (Berkeley) 5/1/95
 .\"
-.Dd November 5, 2010
+.Dd February 19, 2012
 .Dt DUMP 8
 .Os
 .Sh NAME
@@ -57,10 +57,9 @@
 .Op Fl W Li \&| Fl w
 .Pp
 .in -\n[indent-synopsis]u
-(The
-.Bx 4.3
+.Pf ( Bx 4.3
 option syntax is implemented for backward compatibility, but
-is not documented here).
+not documented here.)
 .Sh DESCRIPTION
 .Nm
 examines files on a file system and determines which files need to
@@ -209,15 +208,6 @@ dump.
 The size in kilobyte of the read buffers, rounded up to a multiple of the
 file system block size.
 Default is 32k.
-.It Fl l Ar timeout
-If a tape change is required, eject the tape and wait for the drive to
-be ready again.
-This is to be used with tape changers which automatically load
-the next tape when the tape is ejected.
-If after the timeout (in seconds) the drive is not ready
-.Nm
-falls back to the default behavior,
-and prompts the operator for the next tape.
 .It Fl L Ar label
 The user-supplied text string
 .Ar label
@@ -229,6 +219,15 @@ can access it.
 Note that this label is limited to be at most LBLSIZE
 (currently 16) characters, which must include the terminating
 .Ql \e0 .
+.It Fl l Ar timeout
+If a tape change is required, eject the tape and wait for the drive to
+be ready again.
+This is to be used with tape changers which automatically load
+the next tape when the tape is ejected.
+If after the timeout (in seconds) the drive is not ready
+.Nm
+falls back to the default behavior,
+and prompts the operator for the next tape.
 .It Fl n
 Whenever
 .Nm
@@ -247,6 +246,9 @@ See the
 option for the size of the buffers.
 Maximum is 512, the size of the cache is
 limited to 15% of the avail RAM by default.
+.It Fl S
+Display an estimate of the backup size and the number of tapes
+required, and exit without actually performing the dump.
 .It Fl s Ar feet
 Attempt to calculate the amount of tape needed
 at a particular density.
@@ -255,16 +257,6 @@ If this amount is exceeded,
 prompts for a new tape.
 It is recommended to be a bit conservative on this option.
 The default tape length is 2300 feet.
-.It Fl S
-Display an estimate of the backup size and the number of tapes
-required, and exit without actually performing the dump.
-.It Fl t
-All informational log messages printed by
-.Nm
-will have the time prepended to them.
-Also, the completion time interval estimations
-will have the estimated time at which the dump
-will complete printed at the end of the line.
 .It Fl T Ar date
 Use the specified date as the starting time for the dump
 instead of the time determined from looking in
@@ -278,6 +270,13 @@ The
 option is mutually exclusive from the
 .Fl u
 option.
+.It Fl t
+All informational log messages printed by
+.Nm
+will have the time prepended to them.
+Also, the completion time interval estimations
+will have the estimated time at which the dump
+will complete printed at the end of the line.
 .It Fl u
 Update the file
 .Pa /etc/dumpdates
@@ -300,6 +299,10 @@ If a list of files or subdirectories is 
 (as opposed to an entire file system), then
 .Fl u
 is ignored.
+.It Fl X
+Similar to
+.Fl x
+but uses a file system internal snapshot on the file system to be dumped.
 .It Fl x Ar snap-backup
 Use a snapshot with
 .Ar snap-backup
@@ -307,10 +310,6 @@ as backup for this dump.
 See
 .Xr fss 4
 for more details.
-.It Fl X
-Similar to
-.Fl x
-but uses a file system internal snapshot on the file system to be dumped.
 .It Fl W
 .Nm
 tells the operator what file systems need to be dumped.
@@ -332,7 +331,9 @@ option is set, all other options are ign
 .Nm
 exits immediately.
 .It Fl w
-Is like W, but prints only those file systems which need to be dumped.
+Like
+.Fl W ,
+but prints only those file systems which need to be dumped.
 .El
 .Pp
 If

Index: src/sbin/dump/main.c
diff -u src/sbin/dump/main.c:1.66 src/sbin/dump/main.c:1.67
--- src/sbin/dump/main.c:1.66	Wed Mar 10 20:32:59 2010
+++ src/sbin/dump/main.c	Sun Feb 19 14:49:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.66 2010/03/11 01:32:59 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.67 2012/02/19 19:49:20 christos Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)main.c	8.6 (Berkeley) 5/1/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.66 2010/03/11 01:32:59 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.67 2012/02/19 19:49:20 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -661,9 +661,9 @@ usage(void)
 	const char *prog = getprogname();
 
 	(void)fprintf(stderr,
-"usage: %s [-0123456789aceFnStuX] [-B records] [-b blocksize]\n"
+"usage: %s [-0123456789aceFinStuX] [-B records] [-b blocksize]\n"
 "            [-d density] [-f file] [-h level] [-k read-blocksize]\n"
-"            [-L label] [-l timeout] [-r read-cache] [-s feet]\n"
+"            [-L label] [-l timeout] [-r cachesize] [-s feet]\n"
 "            [-T date] [-x snap-backup] files-to-dump\n"
 "       %s [-W | -w]\n", prog, prog);
 	exit(X_STARTUP);

Reply via email to