From 9540d832294e7d7127ecdfb05ed1e904343e26bd Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 25 Apr 2016 09:43:08 -0400 Subject: utility: integrated mdso_source_version(). --- Makefile.in | 1 - src/mdso.c | 13 ++++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index d8ae066..abf9377 100644 --- a/Makefile.in +++ b/Makefile.in @@ -83,7 +83,6 @@ include $(PROJECT_DIR)/project/overrides.mk -$(APP_SRCS:%.c=%.o): version.tag $(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP) src/%.lo: $(PROJECT_DIR)/src/%.c $(ALL_HEADERS) host.tag dirs.tag version.tag diff --git a/src/mdso.c b/src/mdso.c index 4f01518..4bba3f7 100644 --- a/src/mdso.c +++ b/src/mdso.c @@ -8,7 +8,6 @@ #include #include #include -#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) -- cgit v1.2.3