r3503 - trunk/src/target/gsm/src/util

jserv at sita.openmoko.org jserv at sita.openmoko.org
Sat Nov 24 20:03:48 CET 2007


Author: jserv
Date: 2007-11-24 20:03:43 +0100 (Sat, 24 Nov 2007)
New Revision: 3503

Modified:
   trunk/src/target/gsm/src/util/libgsmd-tool.c
Log:
Print version number in libgsmd-tool.


Modified: trunk/src/target/gsm/src/util/libgsmd-tool.c
===================================================================
--- trunk/src/target/gsm/src/util/libgsmd-tool.c	2007-11-24 18:56:26 UTC (rev 3502)
+++ trunk/src/target/gsm/src/util/libgsmd-tool.c	2007-11-24 19:03:43 UTC (rev 3503)
@@ -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 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 @@
 			verbose = 1;
 			break;
 		case 'V':
-			/* FIXME */
+			dump_version();
+			exit(0);
 			break;
 		case 'h':
 			help();





More information about the commitlog mailing list