[experimental-ims] 46b0d2d Move mgt cli stuff to _mgt.c file

Geoff Simmons geoff at varnish-cache.org
Mon Jan 9 21:52:39 CET 2012


commit 46b0d2d22700ec66782591cbfcb4245baa978913
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Nov 16 06:42:09 2011 +0000

    Move mgt cli stuff to _mgt.c file

diff --git a/bin/varnishd/storage/stevedore.c b/bin/varnishd/storage/stevedore.c
index 9b22cd3..79b1292 100644
--- a/bin/varnishd/storage/stevedore.c
+++ b/bin/varnishd/storage/stevedore.c
@@ -39,7 +39,6 @@
 #include "cache/cache.h"
 
 #include "storage/storage.h"
-#include "vcli_priv.h"
 #include "vrt.h"
 #include "vrt_obj.h"
 
@@ -422,30 +421,6 @@ STV_close(void)
 		stv->close(stv);
 }
 
-/*--------------------------------------------------------------------*/
-
-static void
-stv_cli_list(struct cli *cli, const char * const *av, void *priv)
-{
-	struct stevedore *stv;
-
-	ASSERT_MGT();
-	(void)av;
-	(void)priv;
-	VCLI_Out(cli, "Storage devices:\n");
-	stv = stv_transient;
-		VCLI_Out(cli, "\tstorage.%s = %s\n", stv->ident, stv->name);
-	VTAILQ_FOREACH(stv, &stv_stevedores, list)
-		VCLI_Out(cli, "\tstorage.%s = %s\n", stv->ident, stv->name);
-}
-
-/*--------------------------------------------------------------------*/
-
-struct cli_proto cli_stv[] = {
-	{ "storage.list", "storage.list", "List storage devices\n",
-	    0, 0, "", stv_cli_list },
-	{ NULL}
-};
 
 /*--------------------------------------------------------------------
  * VRT functions for stevedores
diff --git a/bin/varnishd/storage/stevedore_mgt.c b/bin/varnishd/storage/stevedore_mgt.c
index fc0d6a6..4251839 100644
--- a/bin/varnishd/storage/stevedore_mgt.c
+++ b/bin/varnishd/storage/stevedore_mgt.c
@@ -42,12 +42,37 @@
 
 #include "storage/storage.h"
 #include "vav.h"
+#include "vcli_priv.h"
 
 struct stevedore_head stv_stevedores =
     VTAILQ_HEAD_INITIALIZER(stv_stevedores);
 
 struct stevedore *stv_transient;
 
+/*--------------------------------------------------------------------*/
+
+static void
+stv_cli_list(struct cli *cli, const char * const *av, void *priv)
+{
+	struct stevedore *stv;
+
+	ASSERT_MGT();
+	(void)av;
+	(void)priv;
+	VCLI_Out(cli, "Storage devices:\n");
+	stv = stv_transient;
+		VCLI_Out(cli, "\tstorage.%s = %s\n", stv->ident, stv->name);
+	VTAILQ_FOREACH(stv, &stv_stevedores, list)
+		VCLI_Out(cli, "\tstorage.%s = %s\n", stv->ident, stv->name);
+}
+
+/*--------------------------------------------------------------------*/
+
+struct cli_proto cli_stv[] = {
+	{ "storage.list", "storage.list", "List storage devices\n",
+	    0, 0, "", stv_cli_list },
+	{ NULL}
+};
 /*--------------------------------------------------------------------
  * Parse a stevedore argument on the form:
  *	[ name '=' ] strategy [ ',' arg ] *



More information about the varnish-commit mailing list