Various documentation fixes (RHBZ#948883).

This commit is contained in:
Richard W.M. Jones 2013-05-16 13:03:37 +01:00
parent b1cfbb9ecc
commit bb414e001c
3 changed files with 102 additions and 0 deletions

View File

@ -0,0 +1,54 @@
From 2053c6f5f1c597637d4791af4c34eeac144e7802 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 16 May 2013 12:57:33 +0100
Subject: [PATCH 1/2] watchdog: Clearer --help output.
Document all the (non-obsolete) options in the --help output,
including long variants.
The new output is:
./src/watchdog: unrecognized option '--help'
watchdog version 5.13, usage:
watchdog [options]
options:
-F | --foreground run in foreground
-f | --force don't sanity-check config
-c | --config-file <file> specify location of config file
-s | --sync sync filesystem
-b | --softboot soft-boot on error
-q | --no-action do not reboot or halt
-v | --verbose verbose messages
---
src/watchdog.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/watchdog.c b/src/watchdog.c
index 6f93de8..2231f8a 100644
--- a/src/watchdog.c
+++ b/src/watchdog.c
@@ -103,11 +103,17 @@ int mlocked = FALSE, realtime = FALSE;
static void usage(void)
{
fprintf(stderr, "%s version %d.%d, usage:\n", progname, MAJOR_VERSION, MINOR_VERSION);
+ fprintf(stderr, "%s [options]\n", progname);
+ fprintf(stderr, "options:\n");
+ fprintf(stderr, " -F | --foreground run in foreground\n");
+ fprintf(stderr, " -f | --force don't sanity-check config\n");
+ fprintf(stderr, " -c | --config-file <file> specify location of config file\n");
+ fprintf(stderr, " -s | --sync sync filesystem\n");
+ fprintf(stderr, " -b | --softboot soft-boot on error\n");
+ fprintf(stderr, " -q | --no-action do not reboot or halt\n");
#if USE_SYSLOG
- fprintf(stderr, "%s [-F] [-f] [-c <config_file>] [-v] [-s] [-b] [-q]\n", progname);
-#else /* USE_SYSLOG */
- fprintf(stderr, "%s [-F] [-f] [-c <config_file>] [-s] [-b] [-q]\n", progname);
-#endif /* USE_SYSLOG */
+ fprintf(stderr, " -v | --verbose verbose messages\n");
+#endif
exit(1);
}
--
1.8.1.4

View File

@ -0,0 +1,40 @@
From 1c5937a9f852293459f26813f3f166d6650af44f Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 16 May 2013 13:01:11 +0100
Subject: [PATCH 2/2] wd_identify, wd_keepalive: Document -c/--config-file in
--help output.
---
src/wd_identify.c | 2 +-
src/wd_keepalive.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/wd_identify.c b/src/wd_identify.c
index 4eb71fd..41ba0ac 100644
--- a/src/wd_identify.c
+++ b/src/wd_identify.c
@@ -31,7 +31,7 @@ char *devname = NULL, *progname = NULL;
static void usage(void)
{
fprintf(stderr, "%s version %d.%d, usage:\n", progname, MAJOR_VERSION, MINOR_VERSION);
- fprintf(stderr, "%s \n", progname);
+ fprintf(stderr, "%s [-c | --config-file <config_file>]\n", progname);
exit(1);
}
diff --git a/src/wd_keepalive.c b/src/wd_keepalive.c
index 960036a..18e8698 100644
--- a/src/wd_keepalive.c
+++ b/src/wd_keepalive.c
@@ -57,7 +57,7 @@ int mlocked = FALSE, realtime = FALSE;
static void usage(void)
{
fprintf(stderr, "%s version %d.%d, usage:\n", progname, MAJOR_VERSION, MINOR_VERSION);
- fprintf(stderr, "%s \n", progname);
+ fprintf(stderr, "%s [-c | --config-file <config_file>]\n", progname);
exit(1);
}
--
1.8.1.4

View File

@ -12,6 +12,11 @@ Source2: README.watchdog.ipmi
Source3: README.Fedora
Source4: watchdog.service
# Documentation fixes (RHBZ#948883).
# Sent upstream on 2013-05-16.
Patch1: 0001-watchdog-Clearer-help-output.patch
Patch2: 0002-wd_identify-wd_keepalive-Document-c-config-file-in-h.patch
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
@ -36,6 +41,8 @@ expiration) initiated by the BMC.
%prep
%setup -q -n %{name}-%{version}
%patch1 -p1
%patch2 -p1
cp %{SOURCE2} .
cp %{SOURCE3} .
@ -106,6 +113,7 @@ fi
%changelog
* Thu May 16 2013 Richard W.M. Jones <rjones@redhat.com> - 5.13-1
- New upstream version 5.13.
- Various documentation fixes (RHBZ#948883).
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild