summaryrefslogtreecommitdiffstats
path: root/sbin/savecore/savecore.c
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/savecore.c
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/savecore.c')
-rw-r--r--sbin/savecore/savecore.c6
1 files changed, 3 insertions, 3 deletions
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