dovecot-2.0: master: Added --help option

dovecot at dovecot.org dovecot at dovecot.org
Wed Oct 7 19:58:08 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/22276a4717ca
changeset: 9980:22276a4717ca
user:      Pascal Volk <user at localhost.localdomain.org>
date:      Wed Oct 07 16:48:49 2009 +0000
description:
master: Added --help option

diffstat:

1 file changed, 5 insertions(+), 2 deletions(-)
src/master/main.c |    7 +++++--

diffs (24 lines):

diff -r 26588f1b0870 -r 22276a4717ca src/master/main.c
--- a/src/master/main.c	Wed Oct 07 12:28:29 2009 -0400
+++ b/src/master/main.c	Wed Oct 07 16:48:49 2009 +0000
@@ -491,8 +491,8 @@ static void print_help(void)
 {
 	fprintf(stderr,
 "Usage: dovecot [-F] [-c <config file>] [-p] [-n] [-a]\n"
-"       [-cb <config binary path>] [--version] [--build-options] [--log-error]\n"
-"       [reload] [stop]\n");
+"       [-cb <config binary path>] [--help] [--version]\n"
+"       [--build-options] [--log-error] [reload] [stop]\n");
 }
 
 static void print_build_options(void)
@@ -679,6 +679,9 @@ int main(int argc, char *argv[])
 		} else if (strcmp(argv[optind], "--log-error") == 0) {
 			log_error = TRUE;
 			foreground = TRUE;
+		} else if (strcmp(argv[optind], "--help") == 0) {
+			print_help();
+			return 0;
 		} else if (strcmp(argv[optind], "reload") == 0) {
 			send_signal = SIGHUP;
 		} else if (strcmp(argv[optind], "stop") == 0) {


More information about the dovecot-cvs mailing list