summaryrefslogtreecommitdiffstats
path: root/watchquagga
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2015-03-03 08:57:25 +0100
committerDaniel Walton <dwalton@cumulusnetworks.com>2016-05-26 17:33:29 +0200
commite757c94097f6c4193e0acc5a3442298943e6a7a7 (patch)
tree6c5506f5338d02b5b27d71b77c3ca95489f9c5cb /watchquagga
parentlib: silence type range warning in macro (diff)
downloadfrr-e757c94097f6c4193e0acc5a3442298943e6a7a7.tar.xz
frr-e757c94097f6c4193e0acc5a3442298943e6a7a7.zip
watchquagga: break excessively long help string
watchquagga's command line help string exceeds the ISO C maximum string length (4095 characters). Just break it in two. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit 33b9663a89b5ec319986de0673764d2a18ec8725)
Diffstat (limited to 'watchquagga')
-rw-r--r--watchquagga/watchquagga.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/watchquagga/watchquagga.c b/watchquagga/watchquagga.c
index 36c833821..5cb224a45 100644
--- a/watchquagga/watchquagga.c
+++ b/watchquagga/watchquagga.c
@@ -216,7 +216,8 @@ usage(const char *progname, int status)
if (status != 0)
fprintf(stderr, "Try `%s --help' for more information.\n", progname);
else
- printf("Usage : %s [OPTION...] <daemon name> ...\n\n\
+ {
+ printf("Usage : %s [OPTION...] <daemon name> ...\n\n\
Watchdog program to monitor status of quagga daemons and try to restart\n\
them if they are down or unresponsive. It determines whether a daemon is\n\
up based on whether it can connect to the daemon's vty unix stream socket.\n\
@@ -260,8 +261,12 @@ the -m and -M options allow you to control the minimum delay between\n\
restart commands. The minimum restart delay is recalculated each time\n\
a restart is attempted: if the time since the last restart attempt exceeds\n\
twice the -M value, then the restart delay is set to the -m value.\n\
-Otherwise, the interval is doubled (but capped at the -M value).\n\n\
-Options:\n\
+Otherwise, the interval is doubled (but capped at the -M value).\n\n",
+ progname,mode_str[0],progname,mode_str[1],progname,mode_str[2],
+ progname,mode_str[3],progname,mode_str[4],progname,mode_str[2],
+ mode_str[3]);
+
+ printf("Options:\n\
-d, --daemon Run in daemon mode. In this mode, error messages are sent\n\
to syslog instead of stdout.\n\
-S, --statedir Set the vty socket directory (default is %s)\n\
@@ -319,12 +324,12 @@ Options:\n\
it with a space. This is an ugly hack to circumvent problems\n\
passing command-line arguments with embedded spaces.\n\
-v, --version Print program version\n\
--h, --help Display this help and exit\n\
-", progname,mode_str[0],progname,mode_str[1],progname,mode_str[2],
-progname,mode_str[3],progname,mode_str[4],progname,mode_str[2],mode_str[3],
-VTYDIR,DEFAULT_LOGLEVEL,LOG_EMERG,LOG_DEBUG,LOG_DEBUG,
-DEFAULT_MIN_RESTART,DEFAULT_MAX_RESTART,
-DEFAULT_PERIOD,DEFAULT_TIMEOUT,DEFAULT_RESTART_TIMEOUT,DEFAULT_PIDFILE);
+-h, --help Display this help and exit\n",
+ VTYDIR,DEFAULT_LOGLEVEL,LOG_EMERG,LOG_DEBUG,LOG_DEBUG,
+ DEFAULT_MIN_RESTART,DEFAULT_MAX_RESTART,
+ DEFAULT_PERIOD,DEFAULT_TIMEOUT,DEFAULT_RESTART_TIMEOUT,
+ DEFAULT_PIDFILE);
+ }
return status;
}