summaryrefslogtreecommitdiff
path: root/tests/jittertest/JitterTest.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2016-07-19 15:06:58 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2016-11-17 11:36:55 +0100
commit7dd42c510dc8ab10f52dcc2d20dc8af412be0744 (patch)
treefa45022d4754db6a72285d7e9f9284e877ce06c5 /tests/jittertest/JitterTest.c
parent8a00021b2ab5529640e5acaca30a27cdaca04178 (diff)
Unify version string printing
When a program does sophisticated enough command line processing (i.e. getopt), make sure it responds to -V and --version. When a program prints a version string, make sure it uses the common_print_version macro to print out its name, that it is part of mtd-utils and the mtd-utils version from the build system in a fashion similar to common program packages like the GNU coreutils. When a program responds to -V/--version or -h/--help, make sure it reports success exit status. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'tests/jittertest/JitterTest.c')
-rw-r--r--tests/jittertest/JitterTest.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/jittertest/JitterTest.c b/tests/jittertest/JitterTest.c
index 76371e8..1d74b8a 100644
--- a/tests/jittertest/JitterTest.c
+++ b/tests/jittertest/JitterTest.c
@@ -92,7 +92,8 @@
#include <fcntl.h>
#include <sys/mman.h>
-
+#define PROGRAM_NAME "JitterTest"
+#include "common.h"
/**************************** Enumerations ****************************/
enum timerActions
@@ -165,9 +166,6 @@ enum timerActions
/************************** Module Variables **************************/
-/* version identifier (value supplied by CVS)*/
-static const char Version[] = "$Id: JitterTest.c,v 1.13 2005/11/07 11:15:20 gleixner Exp $";
-
static char OutFileName[MAX_FILE_NAME_LEN+1]; /* output file name */
static char LogFile[MAX_FILE_NAME_LEN+1] = "/dev/console"; /* default */
static char ReadFile[MAX_FILE_NAME_LEN+1]; /* This file is read. Should
@@ -988,7 +986,7 @@ void SetSchedulerPriority(
***********************************************************************/
void PrintVersionInfo(void)
{
- printf("JitterTest version %s\n", Version);
+ common_print_version();
printf("Copyright (c) 2001, Daniel Industries, Inc.\n");
return;
}