Mercurial > dovecot > core-2.2
changeset 279:49f4b0be0d87 HEAD
Print usage with invalid parameters.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 20 Sep 2002 14:25:05 +0300 |
parents | abd08fadb297 |
children | fa2d1a1d025e |
files | src/master/main.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/master/main.c Fri Sep 20 09:07:58 2002 +0300 +++ b/src/master/main.c Fri Sep 20 14:25:05 2002 +0300 @@ -8,6 +8,7 @@ #include "auth-process.h" #include "login-process.h" +#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> @@ -211,6 +212,11 @@ _exit(0); } +static void print_help(void) +{ + printf("Usage: imap-master [-F] [-c <config file>]\n"); +} + int main(int argc, char *argv[]) { /* parse arguments */ @@ -230,6 +236,7 @@ if (i == argc) i_fatal("Missing config file argument"); configfile = argv[i]; } else { + print_help(); i_fatal("Unknown argument: %s", argv[1]); } }