From: David Lamparter Date: Tue, 3 Mar 2015 07:57:25 +0000 (+0100) Subject: watchquagga: break excessively long help string X-Git-Tag: frr-2.0-rc1~746 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=e757c94097f6c4193e0acc5a3442298943e6a7a7;p=matthieu%2Ffrr.git 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 (cherry picked from commit 33b9663a89b5ec319986de0673764d2a18ec8725) --- diff --git a/watchquagga/watchquagga.c b/watchquagga/watchquagga.c index 36c8338210..5cb224a45a 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...] ...\n\n\ + { + printf("Usage : %s [OPTION...] ...\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; }