summaryrefslogtreecommitdiffstats
path: root/sbin/savecore
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2012-12-14 15:12:08 +0000
committerpjd <pjd@FreeBSD.org>2012-12-14 15:12:08 +0000
commit1d3ec906ca23ea5f5ff60e8ebe9b3bcc4f9033d2 (patch)
treeff13c1f2adc4025c6e1ae94e7bf27721174fc2bc /sbin/savecore
parentab75315eecbefcf8a215a0a13500f0923fc962f9 (diff)
downloadFreeBSD-src-1d3ec906ca23ea5f5ff60e8ebe9b3bcc4f9033d2.zip
FreeBSD-src-1d3ec906ca23ea5f5ff60e8ebe9b3bcc4f9033d2.tar.gz
- When checking if a dump exists on the given device there is no need to
provide dump directory. Eliminate this redundant argument. This changes the usage, but the only risk here is that a warning will be printed about directory given as device. - Update usage of -C option. - When clearing dump header from the given device there is also no need to provide dump directory, although additional arguments for -c were not documented. - Document that -v can be used with -c and that list of devices can be given. Obtained from: WHEEL Systems
Diffstat (limited to 'sbin/savecore')
-rw-r--r--sbin/savecore/savecore.86
-rw-r--r--sbin/savecore/savecore.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/sbin/savecore/savecore.8 b/sbin/savecore/savecore.8
index 01be723..3e22f5a 100644
--- a/sbin/savecore/savecore.8
+++ b/sbin/savecore/savecore.8
@@ -28,7 +28,7 @@
.\" From: @(#)savecore.8 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
-.Dd December 24, 2008
+.Dd December 14, 2012
.Dt SAVECORE 8
.Os
.Sh NAME
@@ -37,10 +37,12 @@
.Sh SYNOPSIS
.Nm
.Fl c
+.Op Fl v
+.Op Ar device ...
.Nm
.Fl C
.Op Fl v
-.Op Ar directory device
+.Op Ar device ...
.Nm
.Op Fl fkvz
.Op Ar directory Op Ar device ...
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c
index c11c15e..a1fe848 100644
--- a/sbin/savecore/savecore.c
+++ b/sbin/savecore/savecore.c
@@ -636,8 +636,8 @@ static void
usage(void)
{
fprintf(stderr, "%s\n%s\n%s\n",
- "usage: savecore -c",
- " savecore -C [-v] [directory device]",
+ "usage: savecore -c [-v] [device ...]",
+ " savecore -C [-v] [device ...]",
" savecore [-fkvz] [directory [device ...]]");
exit (1);
}
@@ -685,7 +685,7 @@ main(int argc, char **argv)
usage();
argc -= optind;
argv += optind;
- if (argc >= 1) {
+ if (argc >= 1 && !checkfor && !clear) {
error = chdir(argv[0]);
if (error) {
syslog(LOG_ERR, "chdir(%s): %m", argv[0]);
OpenPOWER on IntegriCloud