]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
master: Added --help option
authorPascal Volk <user@localhost.localdomain.org>
Wed, 7 Oct 2009 16:48:49 +0000 (16:48 +0000)
committerPascal Volk <user@localhost.localdomain.org>
Wed, 7 Oct 2009 16:48:49 +0000 (16:48 +0000)
--HG--
branch : HEAD

src/master/main.c

index ee7784587d7a41a1574a852647c35f3791e4f16c..6e16c841b3e5ede49458c90fdba39a88187b5821 100644 (file)
@@ -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) {