summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-24 19:50:40 -0400
committermidipix <writeonce@midipix.org>2016-04-24 19:51:48 -0400
commitf16d2da9c302cae75a6b7c6173e354b0ecf6ba5f (patch)
tree6e1a0ca38d777058ccfdd268d59411080ebc7318 /src
parent1f115d726147285da256a499abc1fe98b3726453 (diff)
downloadsofort-f16d2da9c302cae75a6b7c6173e354b0ecf6ba5f.tar.bz2
sofort-f16d2da9c302cae75a6b7c6173e354b0ecf6ba5f.tar.xz
utility: integrated sfrt_source_version().
Diffstat (limited to 'src')
-rw-r--r--src/sofort.c13
1 files changed, 10 insertions, 3 deletions
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 <stdio.h>
#include <unistd.h>
#include <sofort/sofort.h>
-#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)