Blame SOURCES/0001-watchdog-Clearer-help-output.patch

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