From dbbe7e2f16711a7da4f4d258e45ea19507d15444 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 4 Aug 2006 09:06:40 +0000 Subject: [PATCH] Remove old cli related stuff, it now lives elsewhere git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@635 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/varnishd.c | 143 -------------------------- 1 file changed, 143 deletions(-) diff --git a/varnish-cache/bin/varnishd/varnishd.c b/varnish-cache/bin/varnishd/varnishd.c index a7d5e407..d5679311 100644 --- a/varnish-cache/bin/varnishd/varnishd.c +++ b/varnish-cache/bin/varnishd/varnishd.c @@ -73,33 +73,6 @@ static const char *default_vcl = struct heritage heritage; -#if 0 -/*-------------------------------------------------------------------- - * Generic passthrough for CLI functions - */ - -static void -cli_passthrough_cb(unsigned u, const char *r, void *priv) -{ - struct cli *cli = priv; - - cli_out(cli, "%s\n", r); - cli_result(cli, u); - cli_resume(cli); -} - -static void -m_cli_func_passthrough(struct cli *cli, char **av, void *priv) -{ - - (void)av; - (void)priv; - - cli_suspend(cli); - mgt_child_request(cli_passthrough_cb, cli, &av[2], av[1]); -} -#endif - /*--------------------------------------------------------------------*/ static char * @@ -215,122 +188,6 @@ vcl_file(const char *fflag) return (vf); } -#if 0 - -/*--------------------------------------------------------------------*/ - -static void -m_cli_func_server_start(struct cli *cli, char **av, void *priv) -{ - - (void)cli; - (void)av; - (void)priv; - - mgt_child_start(); -} - -/*--------------------------------------------------------------------*/ - -static void -m_cli_func_server_stop(struct cli *cli, char **av, void *priv) -{ - - (void)cli; - (void)av; - (void)priv; - - mgt_child_stop(); -} - -/*--------------------------------------------------------------------*/ - -static void -m_cli_func_exit(struct cli *cli, char **av, void *priv) -{ - - (void)cli; - (void)av; - (void)priv; - mgt_child_kill(); - exit (0); -} - -/*--------------------------------------------------------------------*/ - -static void -m_cli_func_verbose(struct cli *cli, char **av, void *priv) -{ - - (void)av; - (void)priv; - - cli->verbose = !cli->verbose; -} - - -static void -m_cli_func_ping(struct cli *cli, char **av, void *priv) -{ - time_t t; - - (void)priv; - - if (av[2] != NULL) { - cli_out(cli, "Got your %s\n", av[2]); - } - t = time(NULL); - cli_out(cli, "PONG %ld\n", t); -} - -/*--------------------------------------------------------------------*/ - -static void -m_cli_func_stats(struct cli *cli, char **av, void *priv) -{ - - (void)av; - (void)priv; - - assert (VSL_stats != NULL); -#define MAC_STAT(n,t,f,d) \ - cli_out(cli, "%12ju " d "\n", (VSL_stats->n)); -#include "stat_field.h" -#undef MAC_STAT -} - -/*--------------------------------------------------------------------*/ - -static struct cli_proto cli_proto[] = { - /* URL manipulation */ - { CLI_URL_QUERY, m_cli_func_passthrough, NULL }, - { CLI_URL_PURGE, m_cli_func_passthrough, NULL }, - { CLI_URL_STATUS, m_cli_func_passthrough, NULL }, - { CLI_CONFIG_LOAD, m_cli_func_config_load, NULL }, - { CLI_CONFIG_INLINE, m_cli_func_config_inline, NULL }, - { CLI_CONFIG_UNLOAD, m_cli_func_passthrough, NULL }, - { CLI_CONFIG_LIST, m_cli_func_passthrough, NULL }, - { CLI_CONFIG_USE, m_cli_func_passthrough, NULL }, - { CLI_SERVER_FREEZE, m_cli_func_passthrough, NULL }, - { CLI_SERVER_THAW, m_cli_func_passthrough, NULL }, - { CLI_SERVER_SUSPEND, m_cli_func_passthrough, NULL }, - { CLI_SERVER_RESUME, m_cli_func_passthrough, NULL }, - { CLI_SERVER_STOP, m_cli_func_server_stop, NULL }, - { CLI_SERVER_START, m_cli_func_server_start, NULL }, - { CLI_SERVER_RESTART }, - { CLI_PING, m_cli_func_ping, NULL }, - { CLI_STATS, m_cli_func_stats, NULL }, - { CLI_ZERO }, - { CLI_HELP, cli_func_help, cli_proto }, - { CLI_VERBOSE, m_cli_func_verbose, NULL }, - { CLI_EXIT, m_cli_func_exit, NULL}, - { CLI_QUIT }, - { CLI_BYE }, - { NULL } -}; - -#endif - /*--------------------------------------------------------------------*/ static int -- 2.39.5