r3074 - in trunk/varnish-cache/bin: varnishncsa varnishtest
petter at projects.linpro.no
petter at projects.linpro.no
Mon Aug 11 10:08:50 CEST 2008
Author: petter
Date: 2008-08-11 10:08:50 +0200 (Mon, 11 Aug 2008)
New Revision: 3074
Modified:
trunk/varnish-cache/bin/varnishncsa/varnishncsa.c
trunk/varnish-cache/bin/varnishtest/vtc.c
Log:
Cleaned up some usage statements
Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c
===================================================================
--- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2008-08-11 08:02:24 UTC (rev 3073)
+++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2008-08-11 08:08:50 UTC (rev 3074)
@@ -503,7 +503,7 @@
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);
}
Modified: trunk/varnish-cache/bin/varnishtest/vtc.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc.c 2008-08-11 08:02:24 UTC (rev 3073)
+++ trunk/varnish-cache/bin/varnishtest/vtc.c 2008-08-11 08:08:50 UTC (rev 3074)
@@ -301,6 +301,17 @@
}
/**********************************************************************
+ * Print usage
+ */
+
+static void
+usage(void)
+{
+ fprintf(stderr, "usage: varnishtest [-qv] file ...\n");
+ exit(1);
+}
+
+/**********************************************************************
* Main
*/
@@ -322,13 +333,16 @@
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]);
More information about the varnish-commit
mailing list