diff --git a/src/piler-smtp.c b/src/piler-smtp.c index 7d8f7b35..a6926c6f 100644 --- a/src/piler-smtp.c +++ b/src/piler-smtp.c @@ -41,6 +41,17 @@ struct passwd *pwd; struct smtp_session *session, **sessions=NULL; +void usage(){ + printf("\nusage: piler\n\n"); + printf(" -c Config file to use if not the default\n"); + printf(" -d Fork to the background\n"); + printf(" -v Return the version and build number\n"); + printf(" -V Return the version and some build parameters\n"); + + exit(0); +} + + void p_clean_exit(){ int i; @@ -143,7 +154,7 @@ int main(int argc, char **argv){ case 'h' : default : - __fatal("usage: ..."); + usage(); } } diff --git a/src/piler.c b/src/piler.c index 17382746..617c6053 100644 --- a/src/piler.c +++ b/src/piler.c @@ -41,6 +41,17 @@ struct passwd *pwd; struct child children[MAXCHILDREN]; +void usage(){ + printf("\nusage: piler\n\n"); + printf(" -c Config file to use if not the default\n"); + printf(" -d Fork to the background\n"); + printf(" -v Return the version and build number\n"); + printf(" -V Return the version and some build parameters\n"); + + exit(0); +} + + void takesig(int sig){ int i, status; pid_t pid; @@ -474,7 +485,7 @@ int main(int argc, char **argv){ case 'h' : default : - __fatal("usage: ..."); + usage(); } }