diff options
author | midipix <writeonce@midipix.org> | 2016-04-25 09:43:08 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-11 00:22:39 -0500 |
commit | 9540d832294e7d7127ecdfb05ed1e904343e26bd (patch) | |
tree | 8c2da57d06ce2ba81e4c7275b06533212087ff1b /src | |
parent | 26498daf70041bc96f4dd1817f82d8bee3a30067 (diff) | |
download | mdso-9540d832294e7d7127ecdfb05ed1e904343e26bd.tar.bz2 mdso-9540d832294e7d7127ecdfb05ed1e904343e26bd.tar.xz |
utility: integrated mdso_source_version().
Diffstat (limited to 'src')
-rw-r--r-- | src/mdso.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -8,7 +8,6 @@ #include <unistd.h> #include <mdso/mdso.h> #include <mdso/mdso_output.h> -#include "mdso_version.h" #include "mdso_driver_impl.h" #ifndef MDSO_DRIVER_FLAGS @@ -16,11 +15,19 @@ | MDSO_DRIVER_VERBOSITY_USAGE #endif -static const char vermsg[] = "%s (git://midipix.org/mdso): commit %s.\n"; +static const char vermsg[] = "%s (git://midipix.org/mdso): " + "version %d.%d.%d.\n" + "[commit reference: %s]\n"; static ssize_t mdso_version(struct mdso_driver_ctx * dctx) { - return fprintf(stdout,vermsg,dctx->program,MDSO_GIT_VERSION); + const struct mdso_source_version * verinfo; + + verinfo = mdso_source_version(); + + return fprintf(stdout,vermsg,dctx->program, + verinfo->major,verinfo->minor,verinfo->revision, + verinfo->commit); } static void mdso_perform_unit_actions(struct mdso_unit_ctx * uctx) |