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

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