mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
Capitalize at the start of sentence. Add rcsid. Remove unused #includes.
Use `dumpon' instead of argv[0].
This commit is contained in:
parent
074fad210f
commit
8f034b11f2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36999
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user