Commit d6193061 authored by Geoff Simmons's avatar Geoff Simmons

Backported commit d47db772a308970b8e0b61cbc985e51c1a2e2947 from trunk:

"Add the version identifier to the CLI banner.

Inspired by:	patch from geoff"
parent f36bf950
......@@ -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, "-----------------------------\n");
VCLI_Out(cli, "%s\n", VSB_data(vident) + 1);
VCLI_Out(cli, "%s\n", VCS_version);
VCLI_Out(cli, "\n");
VCLI_Out(cli, "Type 'help' for command list.\n");
VCLI_Out(cli, "Type 'quit' to close CLI session.\n");
......
......@@ -104,6 +104,7 @@ struct timespec TIM_timespec(double t);
struct timeval TIM_timeval(double t);
/* from libvarnish/version.c */
extern const char *VCS_version;
void VCS_Message(const char *);
/* from libvarnish/vtmpfile.c */
......
......@@ -36,11 +36,13 @@
#include "libvarnish.h"
#include "vcs_version.h"
const char *VCS_version =
PACKAGE_TARNAME "-" PACKAGE_VERSION " revision " VCS_Version;
void
VCS_Message(const char *progname)
{
fprintf(stderr, "%s (%s-%s revision %s)\n", progname,
PACKAGE_TARNAME, PACKAGE_VERSION, VCS_Version);
fprintf(stderr, "%s (%s)\n", progname, VCS_version);
fprintf(stderr, "Copyright (c) 2006 Verdens Gang 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