From 615674cdec067066a42f53f5d55628ab7b207e6c Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 23 Jan 2012 08:15:51 +0100 Subject: [PATCH] MINOR: halog: add some help on the command line --- contrib/halog/halog.c | 47 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/contrib/halog/halog.c b/contrib/halog/halog.c index 40852aec0..250623d82 100644 --- a/contrib/halog/halog.c +++ b/contrib/halog/halog.c @@ -123,19 +123,58 @@ void filter_graphs(const char *accept_field, const char *time_field, struct time void filter_output_line(const char *accept_field, const char *time_field, struct timer **tptr); void filter_accept_holes(const char *accept_field, const char *time_field, struct timer **tptr); -void die(const char *msg) +void usage(FILE *output, const char *msg) { - fprintf(stderr, + fprintf(output, "%s" - "Usage: halog [-q] [-c] [-v] {-gt|-pct|-st|-tc|-srv|-u|-uc|-ue|-ua|-ut|-uao|-uto}\n" + "Usage: halog [-h|--help] for long help\n" + " halog [-q] [-c] [-v] {-gt|-pct|-st|-tc|-srv|-u|-uc|-ue|-ua|-ut|-uao|-uto}\n" " [-s ] [-e|-E] [-H] [-rt|-RT