From c78c6c09bb4fefdc2aebe68500fa099e183dd24d Mon Sep 17 00:00:00 2001 From: hadaq Date: Wed, 2 Sep 2009 22:09:27 +0000 Subject: [PATCH] added rcsid --- trbrich/trb_i2c.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/trbrich/trb_i2c.c b/trbrich/trb_i2c.c index 3cf7ef2..bf9509a 100644 --- a/trbrich/trb_i2c.c +++ b/trbrich/trb_i2c.c @@ -12,6 +12,8 @@ #define BUFFER_SIZE 4096 +static const char trb_i2c_version[] = "$Revision: 1.3 $"; + static const uint16_t trb_i2c_register = 0x8040; static const unsigned int timeout = 1000; @@ -22,6 +24,7 @@ void usage(const char *progName) printf("Options:\n"); printf(" -h give this help\n"); printf(" -d turn on Debugging Information\n"); + printf(" -V Version number\n"); printf("\nCommands:\n"); printf(" w -> " "write to \n"); @@ -131,7 +134,7 @@ int main(int argc, char** argv) trb_lazy = 0; /* Parse Arguments */ - while ((i = getopt(argc, argv, "+hd:")) != -1) { + while ((i = getopt(argc, argv, "+hd:V")) != -1) { switch (i) { case '?': usage(basename(argv[0])); @@ -142,6 +145,11 @@ int main(int argc, char** argv) case 'd': trb_debug = strtoul(optarg, NULL, 0); break; + case 'V': + printf("%s %s, using libtrbnet %s\n", + basename(argv[0]), trb_i2c_version, trbnet_version); + exit(EXIT_SUCCESS); + break; default: break; } -- 2.43.0