From 31be4ce7ca550a6fd9c4eb39abdd2f9f5ac8db44 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 10 Apr 2013 14:29:09 -0400 Subject: util_version: new helper for displaying version info This is so all utilities can have this flag and not just dtc. Acked-by: David Gibson Signed-off-by: Mike Frysinger --- util.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'util.c') diff --git a/util.c b/util.c index c689ea7..a9b118c 100644 --- a/util.c +++ b/util.c @@ -34,6 +34,7 @@ #include "libfdt.h" #include "util.h" +#include "version_gen.h" char *xstrdup(const char *s) { @@ -374,3 +375,9 @@ void utilfdt_print_data(const char *data, int len) printf("]"); } } + +void util_version(void) +{ + printf("Version: %s\n", DTC_VERSION); + exit(0); +} -- cgit v1.1