From ad6fb7bf238070ec09b2aa9422e0a31eed328c3b Mon Sep 17 00:00:00 2001 From: jserv Date: Sat, 24 Nov 2007 19:03:43 +0000 Subject: Print version number in libgsmd-tool. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3503 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/util/libgsmd-tool.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/util/libgsmd-tool.c b/src/util/libgsmd-tool.c index 5a7bdda..653139b 100644 --- a/src/util/libgsmd-tool.c +++ b/src/util/libgsmd-tool.c @@ -35,6 +35,8 @@ #include "shell.h" #include "atcmd.h" +#include "../gsmd/gsmd-version.h" + #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #endif @@ -89,10 +91,15 @@ static void help(void) ); } +static void dump_version(void) +{ + printf("Version: " GSMD_VERSION "\n"); +} + int main(int argc, char **argv) { char *pin = NULL; - int rc, i, mode, shellwait = 0; + int mode = MODE_NONE, shellwait = 0; printf("libgsm-tool - (C) 2006-2007 by Harald Welte and OpenMoko, Inc.\n" "This program is Free Software and has ABSOLUTELY NO WARRANTY\n\n"); @@ -108,7 +115,8 @@ int main(int argc, char **argv) verbose = 1; break; case 'V': - /* FIXME */ + dump_version(); + exit(0); break; case 'h': help(); -- cgit v1.2.3