diff options
author | charnier <charnier@FreeBSD.org> | 1998-06-15 07:03:47 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1998-06-15 07:03:47 +0000 |
commit | 9d674a7e985bdb87f5fa37da111245b1e6f5f8f3 (patch) | |
tree | e7bd81ef8b0016f7be7019e7814c3d17872b8b01 /sbin/dumpon | |
parent | d1aa93470ac100b023bf6ee323b0aa6b912b042e (diff) | |
download | FreeBSD-src-9d674a7e985bdb87f5fa37da111245b1e6f5f8f3.zip FreeBSD-src-9d674a7e985bdb87f5fa37da111245b1e6f5f8f3.tar.gz |
Capitalize at the start of sentence. Add rcsid. Remove unused #includes.
Use `dumpon' instead of argv[0].
Diffstat (limited to 'sbin/dumpon')
-rw-r--r-- | sbin/dumpon/dumpon.8 | 6 | ||||
-rw-r--r-- | sbin/dumpon/dumpon.c | 26 |
2 files changed, 14 insertions, 18 deletions
diff --git a/sbin/dumpon/dumpon.8 b/sbin/dumpon/dumpon.8 index 5d7aea6..d1ea84d 100644 --- a/sbin/dumpon/dumpon.8 +++ b/sbin/dumpon/dumpon.8 @@ -10,7 +10,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: +.\" must display the following acknowledgment: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)swapon.8 8.1 (Berkeley) 6/5/93 -.\" $Id: dumpon.8,v 1.6 1998/05/25 08:54:40 jkoshy Exp $ +.\" $Id: dumpon.8,v 1.7 1998/05/27 11:05:59 jkoshy Exp $ .\" .Dd May 12, 1995 .Dt DUMPON 8 @@ -116,7 +116,7 @@ boot-time system configuration Because the filesystem layer is already dead by the time a crash dump is taken, it is not possible to send crash dumps directly to a file. .Pp -.Nm +.Nm Dumpon currently allows only devices with minor number 1 to be used as dump devices. .Sh HISTORY diff --git a/sbin/dumpon/dumpon.c b/sbin/dumpon/dumpon.c index 8da85cd..547b618 100644 --- a/sbin/dumpon/dumpon.c +++ b/sbin/dumpon/dumpon.c @@ -32,42 +32,38 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1980, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -/*static char sccsid[] = "From: @(#)swapon.c 8.1 (Berkeley) 6/5/93";*/ +#if 0 +static char sccsid[] = "From: @(#)swapon.c 8.1 (Berkeley) 6/5/93"; +#endif static const char rcsid[] = - "$Id: dumpon.c,v 1.4 1997/02/22 14:32:22 peter Exp $"; + "$Id$"; #endif /* not lint */ -#include <errno.h> +#include <err.h> #include <stdio.h> -#include <stdlib.h> #include <unistd.h> #include <sys/param.h> #include <sys/types.h> #include <sys/sysctl.h> #include <sys/stat.h> #include <sysexits.h> -#include <err.h> void usage __P((void)) __dead2; -static char *whoami; int main(int argc, char **argv) { - extern char *optarg; - extern int optind; int ch, verbose, rv; struct stat stab; int mib[2]; verbose = rv = 0; - whoami = argv[0]; while ((ch = getopt(argc, argv, "v")) != -1) switch((char)ch) { case 'v': @@ -107,10 +103,10 @@ main(int argc, char **argv) if (verbose) { if (stab.st_rdev == NODEV) { - printf("%s: crash dumps disabled\n", whoami); + printf("dumpon: crash dumps disabled\n"); } else { - printf("%s: crash dumps to %s (%lu, %lu)\n", - whoami, argv[0], + printf("dumpon: crash dumps to %s (%lu, %lu)\n", + argv[0], (unsigned long)major(stab.st_rdev), (unsigned long)minor(stab.st_rdev)); } @@ -123,7 +119,7 @@ void usage() { fprintf(stderr, - "usage: %s [-v] special_file\n" - " %s [-v] off\n", whoami, whoami); + "usage: dumpon [-v] special_file\n" + " dumpon [-v] off\n"); exit(EX_USAGE); } |