[prev in list] [next in list] [prev in thread] [next in thread]
List: varnish-commit
Subject: [master] cd43465 Make varnishlog complain if regex and tag is passed
From: tfheen () varnish-cache ! org (Tollef Fog Heen)
Date: 2011-03-31 11:19:27
Message-ID: E1Q5FuR-0000Tv-BF () project ! varnish-software ! com
[Download RAW message or body]
commit cd4346594e48acc97e9f4731f4d469bde6d16d82
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date: Thu Mar 31 13:18:57 2011 +0200
Make varnishlog complain if regex and tag is passed but no -o
diff --git a/bin/varnishlog/varnishlog.c b/bin/varnishlog/varnishlog.c
index f7075ac..0d78bf2 100644
--- a/bin/varnishlog/varnishlog.c
+++ b/bin/varnishlog/varnishlog.c
@@ -303,7 +303,7 @@ static void
usage(void)
{
fprintf(stderr, "usage: varnishlog "
- "%s [-aDoV] [-n varnish_name] [-P file] [-w file]\n", VSL_USAGE);
+ "%s [-aDV] [-o [tag regex]] [-n varnish_name] [-P file] [-w file]\n", VSL_USAGE);
exit(1);
}
@@ -361,6 +361,9 @@ main(int argc, char * const *argv)
if (o_flag && w_arg != NULL)
usage();
+ if ((argc - optind) > 0 && !o_flag)
+ usage();
+
if (VSL_Open(vd, 1))
exit(1);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic