summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjserv <jserv@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-11-24 19:03:43 +0000
committerjserv <jserv@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-11-24 19:03:43 +0000
commitad6fb7bf238070ec09b2aa9422e0a31eed328c3b (patch)
tree335a9f4d8f79442aec80015a184a2c1a75de0c1b
parentf1b7cbfd7e3fa48948928d27ccca783fd1f35162 (diff)
Print version number in libgsmd-tool.
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3503 99fdad57-331a-0410-800a-d7fa5415bdb3
-rw-r--r--src/util/libgsmd-tool.c12
1 files 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();
personal git repositories of Harald Welte. Your mileage may vary