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

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