[master] 60d5c6d Move VUT options from vapi_options.h to vut_options.h

Martin Blix Grydeland martin at varnish-cache.org
Thu Oct 10 16:48:39 CEST 2013


commit 60d5c6dad665c6c9944ccaef4d0a4f82b77bbbee
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Wed Oct 9 18:23:21 2013 +0200

    Move VUT options from vapi_options.h to vut_options.h
    
    Some options were defined in the incorrect file. Move them where they
    should be.

diff --git a/bin/varnishlog/varnishlog_options.h b/bin/varnishlog/varnishlog_options.h
index 1c1df7c..4ca0dd5 100644
--- a/bin/varnishlog/varnishlog_options.h
+++ b/bin/varnishlog/varnishlog_options.h
@@ -30,23 +30,23 @@
 #include "vapi/vapi_options.h"
 #include "vut_options.h"
 
-VSL_OPT_a
+VUT_OPT_a
 VSL_OPT_b
 VSL_OPT_c
-VSL_OPT_d
+VUT_OPT_d
 VUT_OPT_D
-VSL_OPT_g
+VUT_OPT_g
 VSL_OPT_i
 VSL_OPT_I
 VSL_OPT_L
-VSM_OPT_n
-VSM_OPT_N
+VUT_OPT_n
+VUT_OPT_N
 VUT_OPT_P
 VUT_OPT_q
-VSL_OPT_r
+VUT_OPT_r
 VSL_OPT_T
-VSL_OPT_u
+VUT_OPT_u
 VSL_OPT_v
-VSL_OPT_w
+VUT_OPT_w
 VSL_OPT_x
 VSL_OPT_X
diff --git a/include/vapi/vapi_options.h b/include/vapi/vapi_options.h
index 344b3ed..e2ddcfa 100644
--- a/include/vapi/vapi_options.h
+++ b/include/vapi/vapi_options.h
@@ -27,32 +27,12 @@
  * SUCH DAMAGE.
  */
 
-/* VSM options */
-
-#define VSM_OPT_n							\
-	VOPT("n:", "[-n name]", "Varnish instance name",		\
-	    "Specify the name of the varnishd instance to get logs"	\
-	    " from. If -n is not specified, the host name is used."	\
-	)
-
-#define VSM_OPT_N							\
-	VOPT("N:", "[-N filename]", "VSM filename",			\
-	    "Specify the filename of a stale VSM instance. When using"	\
-	    " this option the abandonment checking is disabled."	\
-	)
-
 /* VSL options */
 
 #define VSL_iI_PS							\
 	"If a tag include option is the first of any tag selection"	\
 	" options, all tags are first marked excluded."
 
-#define VSL_OPT_a							\
-	VOPT("a", "[-a]", "Append binary file output",			\
-	    "When writing binary output to a file, append to it rather"	\
-	    " than overwrite it."					\
-	)
-
 #define VSL_OPT_b							\
 	VOPT("b", "[-b]", "Only display backend records",		\
 	    "Only display transactions and log records coming from"	\
@@ -65,18 +45,6 @@
 	    " client communication."					\
 	)
 
-#define VSL_OPT_d \
-	VOPT("d", "[-d]", "Process old log entries on startup",		\
-	    "Start processing log records at the head of the log"	\
-	    " instead of the tail."					\
-	)
-
-#define VSL_OPT_g							\
-	VOPT("g:", "[-g <session|request|vxid|raw>]", "Grouping mode",	\
-	    "The grouping of the log records. The default is to group"	\
-	    " by request."						\
-	)
-
 #define VSL_OPT_i							\
 	VOPT("i:", "[-i taglist]", "Include tags",			\
 	    "Include log records of these tags in output. Taglist is"   \
@@ -104,11 +72,6 @@
 	    " running queries. Defaults to 1000 transactions."		\
 	)
 
-#define VSL_OPT_r							\
-	VOPT("r:", "[-r filename]", "Binary file input",		\
-	    "Read log in binary file format from this file."		\
-	)
-
 #define VSL_OPT_T							\
 	VOPT("T:", "[-T seconds]", "Transaction end timeout",		\
 	    "Sets the transaction timeout in seconds. This defines the"	\
@@ -118,11 +81,6 @@
 	    " completed. Defaults to 120 seconds."			\
 	)
 
-#define VSL_OPT_u							\
-	VOPT("u", "[-u]", "Binary file output unbuffered",		\
-	    "Unbuffered binary file output mode."			\
-	)
-
 #define VSL_OPT_v							\
 	VOPT("v", "[-v]", "Verbose record printing",			\
 	    "Use verbose output on record set printing, giving the"	\
@@ -130,15 +88,6 @@
 	    " will only be given on the header of that transaction."	\
 	)
 
-#define VSL_OPT_w							\
-	VOPT("w:", "[-w filename]", "Binary output filename",		\
-	    "Write log entries to this file instead of displaying"	\
-	    " them. The file will be overwritten unless the -a option"	\
-	    " was specified. If the application receives a SIGHUP"	\
-	    " while writing to a file, it will reopen the file"		\
-	    " allowing the old one to be rotated away."			\
-	)
-
 #define VSL_OPT_x							\
 	VOPT("x:", "[-x taglist]", "Exclude tags",			\
 	    "Exclude log records of these tags in output. Taglist is"   \
diff --git a/include/vut_options.h b/include/vut_options.h
index 7328b91..cc25ae8 100644
--- a/include/vut_options.h
+++ b/include/vut_options.h
@@ -29,11 +29,41 @@
 
 /* VUT options */
 
+#define VUT_OPT_a							\
+	VOPT("a", "[-a]", "Append binary file output",			\
+	    "When writing binary output to a file, append to it rather"	\
+	    " than overwrite it."					\
+	)
+
+#define VUT_OPT_d \
+	VOPT("d", "[-d]", "Process old log entries on startup",		\
+	    "Start processing log records at the head of the log"	\
+	    " instead of the tail."					\
+	)
+
 #define VUT_OPT_D							\
 	VOPT("D", "[-D]", "Daemonize",					\
 	    "Daemonize."						\
 	)
 
+#define VUT_OPT_g							\
+	VOPT("g:", "[-g <session|request|vxid|raw>]", "Grouping mode",	\
+	    "The grouping of the log records. The default is to group"	\
+	    " by request."						\
+	)
+
+#define VUT_OPT_n							\
+	VOPT("n:", "[-n name]", "Varnish instance name",		\
+	    "Specify the name of the varnishd instance to get logs"	\
+	    " from. If -n is not specified, the host name is used."	\
+	)
+
+#define VUT_OPT_N							\
+	VOPT("N:", "[-N filename]", "VSM filename",			\
+	    "Specify the filename of a stale VSM instance. When using"	\
+	    " this option the abandonment checking is disabled."	\
+	)
+
 #define VUT_OPT_P							\
 	VOPT("P:", "[-P file]", "PID file",				\
 		"Write the process' PID to the specified file."		\
@@ -43,3 +73,22 @@
 	VOPT("q:", "[-q query]", "VSL query",				\
 		"Specifies the VSL query to use."			\
 	)
+
+#define VUT_OPT_r							\
+	VOPT("r:", "[-r filename]", "Binary file input",		\
+	    "Read log in binary file format from this file."		\
+	)
+
+#define VUT_OPT_u							\
+	VOPT("u", "[-u]", "Binary file output unbuffered",		\
+	    "Unbuffered binary file output mode."			\
+	)
+
+#define VUT_OPT_w							\
+	VOPT("w:", "[-w filename]", "Binary output filename",		\
+	    "Write log entries to this file instead of displaying"	\
+	    " them. The file will be overwritten unless the -a option"	\
+	    " was specified. If the application receives a SIGHUP"	\
+	    " while writing to a file, it will reopen the file"		\
+	    " allowing the old one to be rotated away."			\
+	)



More information about the varnish-commit mailing list