
phk at varnish-cache
Aug 6, 2012, 1:12 AM
Post #1 of 1
(39 views)
Permalink
|
|
[master] d47db77 Add the version identifier to the CLI banner.
|
|
commit d47db772a308970b8e0b61cbc985e51c1a2e2947 Author: Poul-Henning Kamp <phk [at] FreeBSD> Date: Mon Aug 6 08:12:13 2012 +0000 Add the version identifier to the CLI banner. Inspired by: patch from geoff diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c index 3b0c1a7..6f319f6 100644 --- a/bin/varnishd/mgt/mgt_cli.c +++ b/bin/varnishd/mgt/mgt_cli.c @@ -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"); diff --git a/include/vcs.h b/include/vcs.h index f764100..d3a1585 100644 --- a/include/vcs.h +++ b/include/vcs.h @@ -29,4 +29,5 @@ */ /* from libvarnish/version.c */ +extern const char *VCS_version; void VCS_Message(const char *); diff --git a/lib/libvarnish/version.c b/lib/libvarnish/version.c index 2220a69..b7b2edc 100644 --- a/lib/libvarnish/version.c +++ b/lib/libvarnish/version.c @@ -36,11 +36,13 @@ #include "vcs.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"); } _______________________________________________ varnish-commit mailing list varnish-commit [at] varnish-cache https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
|