From 9d674a7e985bdb87f5fa37da111245b1e6f5f8f3 Mon Sep 17 00:00:00 2001 From: charnier Date: Mon, 15 Jun 1998 07:03:47 +0000 Subject: Capitalize at the start of sentence. Add rcsid. Remove unused #includes. Use `dumpon' instead of argv[0]. --- sbin/dumpon/dumpon.8 | 6 +++--- sbin/dumpon/dumpon.c | 26 +++++++++++--------------- 2 files changed, 14 insertions(+), 18 deletions(-) (limited to 'sbin/dumpon') 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 +#include #include -#include #include #include #include #include #include #include -#include 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); } -- cgit v1.1