From f16d2da9c302cae75a6b7c6173e354b0ecf6ba5f Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 24 Apr 2016 19:50:40 -0400 Subject: utility: integrated sfrt_source_version(). --- src/sofort.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/sofort.c b/src/sofort.c index f686bbd..52ca314 100644 --- a/src/sofort.c +++ b/src/sofort.c @@ -1,7 +1,6 @@ #include #include #include -#include "sofort_version.h" #include "sofort_driver_impl.h" #ifndef SFRT_DRIVER_FLAGS @@ -9,11 +8,19 @@ | SFRT_DRIVER_VERBOSITY_USAGE #endif -static const char vermsg[] = "%s (git://localhost/sofort): commit %s.\n"; +static const char vermsg[] = "%s (git://midipix.org/sofort): " + "version %d.%d.%d.\n" + "[commit reference: %s]\n"; static ssize_t sofort_version(struct sfrt_driver_ctx * dctx) { - return fprintf(stdout,vermsg,dctx->program,SOFORT_GIT_VERSION); + const struct sfrt_source_version * verinfo; + + verinfo = sfrt_source_version(); + + return fprintf(stdout,vermsg,dctx->program, + verinfo->major,verinfo->minor,verinfo->revision, + verinfo->commit); } static void sofort_perform_unit_actions(struct sfrt_unit_ctx * uctx) -- cgit v1.2.3