From: petter Date: Mon, 11 Aug 2008 08:08:50 +0000 (+0000) Subject: Cleaned up some usage statements X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a0518c9619e62a707a76a148227ceb8c7155c1b;p=varnish Cleaned up some usage statements git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3074 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishncsa/varnishncsa.c b/varnish-cache/bin/varnishncsa/varnishncsa.c index efaf61bc..3c133aa0 100644 --- a/varnish-cache/bin/varnishncsa/varnishncsa.c +++ b/varnish-cache/bin/varnishncsa/varnishncsa.c @@ -503,7 +503,7 @@ static void usage(void) { - fprintf(stderr, "usage: varnishncsa %s [-aDV] [-n varnish_name] [-P file] [-w file]\n", VSL_ARGS); + fprintf(stderr, "usage: varnishncsa %s [-aDV] [-n varnish_name] [-P file] [-w file]\n", VSL_USAGE); exit(1); } diff --git a/varnish-cache/bin/varnishtest/vtc.c b/varnish-cache/bin/varnishtest/vtc.c index 89333d21..fc263ce1 100644 --- a/varnish-cache/bin/varnishtest/vtc.c +++ b/varnish-cache/bin/varnishtest/vtc.c @@ -300,6 +300,17 @@ exec_file(const char *fn) printf("# TEST %s completed\n", fn); } +/********************************************************************** + * Print usage + */ + +static void +usage(void) +{ + fprintf(stderr, "usage: varnishtest [-qv] file ...\n"); + exit(1); +} + /********************************************************************** * Main */ @@ -322,13 +333,16 @@ main(int argc, char * const *argv) case 'v': vtc_verbosity++; break; - case '?': default: - errx(1, "Usage"); + usage(); } } argc -= optind; argv += optind; + + if(argc == 0) + usage(); + init_sema(); for (ch = 0; ch < argc; ch++) exec_file(argv[ch]);