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
|
.\" notice, this list of conditions and the following disclaimer in the
|
||||||
.\" documentation and/or other materials provided with the distribution.
|
.\" documentation and/or other materials provided with the distribution.
|
||||||
.\" 3. All advertising materials mentioning features or use of this software
|
.\" 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
|
.\" This product includes software developed by the University of
|
||||||
.\" California, Berkeley and its contributors.
|
.\" California, Berkeley and its contributors.
|
||||||
.\" 4. Neither the name of the University nor the names of its contributors
|
.\" 4. Neither the name of the University nor the names of its contributors
|
||||||
@ -30,7 +30,7 @@
|
|||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.\" From: @(#)swapon.8 8.1 (Berkeley) 6/5/93
|
.\" 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
|
.Dd May 12, 1995
|
||||||
.Dt DUMPON 8
|
.Dt DUMPON 8
|
||||||
@ -116,7 +116,7 @@ boot-time system configuration
|
|||||||
Because the filesystem layer is already dead by the time a crash dump
|
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.
|
is taken, it is not possible to send crash dumps directly to a file.
|
||||||
.Pp
|
.Pp
|
||||||
.Nm
|
.Nm Dumpon
|
||||||
currently allows only devices with minor number 1 to be used as dump
|
currently allows only devices with minor number 1 to be used as dump
|
||||||
devices.
|
devices.
|
||||||
.Sh HISTORY
|
.Sh HISTORY
|
||||||
|
@ -32,42 +32,38 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static const char copyright[] =
|
||||||
"@(#) Copyright (c) 1980, 1993\n\
|
"@(#) Copyright (c) 1980, 1993\n\
|
||||||
The Regents of the University of California. All rights reserved.\n";
|
The Regents of the University of California. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#ifndef 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[] =
|
static const char rcsid[] =
|
||||||
"$Id: dumpon.c,v 1.4 1997/02/22 14:32:22 peter Exp $";
|
"$Id$";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <errno.h>
|
#include <err.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sysexits.h>
|
#include <sysexits.h>
|
||||||
#include <err.h>
|
|
||||||
|
|
||||||
void usage __P((void)) __dead2;
|
void usage __P((void)) __dead2;
|
||||||
static char *whoami;
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
extern char *optarg;
|
|
||||||
extern int optind;
|
|
||||||
int ch, verbose, rv;
|
int ch, verbose, rv;
|
||||||
struct stat stab;
|
struct stat stab;
|
||||||
int mib[2];
|
int mib[2];
|
||||||
|
|
||||||
verbose = rv = 0;
|
verbose = rv = 0;
|
||||||
whoami = argv[0];
|
|
||||||
while ((ch = getopt(argc, argv, "v")) != -1)
|
while ((ch = getopt(argc, argv, "v")) != -1)
|
||||||
switch((char)ch) {
|
switch((char)ch) {
|
||||||
case 'v':
|
case 'v':
|
||||||
@ -107,10 +103,10 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
if (stab.st_rdev == NODEV) {
|
if (stab.st_rdev == NODEV) {
|
||||||
printf("%s: crash dumps disabled\n", whoami);
|
printf("dumpon: crash dumps disabled\n");
|
||||||
} else {
|
} else {
|
||||||
printf("%s: crash dumps to %s (%lu, %lu)\n",
|
printf("dumpon: crash dumps to %s (%lu, %lu)\n",
|
||||||
whoami, argv[0],
|
argv[0],
|
||||||
(unsigned long)major(stab.st_rdev),
|
(unsigned long)major(stab.st_rdev),
|
||||||
(unsigned long)minor(stab.st_rdev));
|
(unsigned long)minor(stab.st_rdev));
|
||||||
}
|
}
|
||||||
@ -123,7 +119,7 @@ void
|
|||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage: %s [-v] special_file\n"
|
"usage: dumpon [-v] special_file\n"
|
||||||
" %s [-v] off\n", whoami, whoami);
|
" dumpon [-v] off\n");
|
||||||
exit(EX_USAGE);
|
exit(EX_USAGE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user