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>
diff --git a/watchquagga/watchquagga.c b/watchquagga/watchquagga.c
index c34816c..d92803d 100644
--- a/watchquagga/watchquagga.c
+++ b/watchquagga/watchquagga.c
@@ -215,7 +215,8 @@
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\
@@ -259,8 +260,12 @@
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\
@@ -318,12 +323,12 @@
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;
}