Commit d47db772 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add the version identifier to the CLI banner.

Inspired by:	patch from geoff
parent f81aeddd
...@@ -80,6 +80,7 @@ mcf_banner(struct cli *cli, const char *const *av, void *priv) ...@@ -80,6 +80,7 @@ mcf_banner(struct cli *cli, const char *const *av, void *priv)
VCLI_Out(cli, "Varnish Cache CLI 1.0\n"); VCLI_Out(cli, "Varnish Cache CLI 1.0\n");
VCLI_Out(cli, "-----------------------------\n"); VCLI_Out(cli, "-----------------------------\n");
VCLI_Out(cli, "%s\n", VSB_data(vident) + 1); VCLI_Out(cli, "%s\n", VSB_data(vident) + 1);
VCLI_Out(cli, "%s\n", VCS_version);
VCLI_Out(cli, "\n"); VCLI_Out(cli, "\n");
VCLI_Out(cli, "Type 'help' for command list.\n"); VCLI_Out(cli, "Type 'help' for command list.\n");
VCLI_Out(cli, "Type 'quit' to close CLI session.\n"); VCLI_Out(cli, "Type 'quit' to close CLI session.\n");
......
...@@ -29,4 +29,5 @@ ...@@ -29,4 +29,5 @@
*/ */
/* from libvarnish/version.c */ /* from libvarnish/version.c */
extern const char *VCS_version;
void VCS_Message(const char *); void VCS_Message(const char *);
...@@ -36,11 +36,13 @@ ...@@ -36,11 +36,13 @@
#include "vcs.h" #include "vcs.h"
#include "vcs_version.h" #include "vcs_version.h"
const char *VCS_version =
PACKAGE_TARNAME "-" PACKAGE_VERSION " revision " VCS_Version;
void void
VCS_Message(const char *progname) VCS_Message(const char *progname)
{ {
fprintf(stderr, "%s (%s-%s revision %s)\n", progname, fprintf(stderr, "%s (%s)\n", progname, VCS_version);
PACKAGE_TARNAME, PACKAGE_VERSION, VCS_Version);
fprintf(stderr, "Copyright (c) 2006 Verdens Gang AS\n"); fprintf(stderr, "Copyright (c) 2006 Verdens Gang AS\n");
fprintf(stderr, "Copyright (c) 2006-2011 Varnish Software AS\n"); fprintf(stderr, "Copyright (c) 2006-2011 Varnish Software AS\n");
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment