diff --git a/src/piler-smtp.c b/src/piler-smtp.c index 7d8f7b3..a6926c6 100644 --- a/src/piler-smtp.c +++ b/src/piler-smtp.c @@ -41,6 +41,17 @@ 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 @@ case 'h' : default : - __fatal("usage: ..."); + usage(); } } diff --git a/src/piler.c b/src/piler.c index 1738274..617c605 100644 --- a/src/piler.c +++ b/src/piler.c @@ -41,6 +41,17 @@ 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 @@ case 'h' : default : - __fatal("usage: ..."); + usage(); } }